]> git.scottworley.com Git - pinch/commitdiff
Make the tests indifferent about user channels
authorScott Worley <scottworley@scottworley.com>
Sat, 16 Apr 2022 07:23:26 +0000 (00:23 -0700)
committerScott Worley <scottworley@scottworley.com>
Sat, 16 Apr 2022 07:26:18 +0000 (00:26 -0700)
Changelog
tests/alias.sh
tests/core.sh
tests/multi-update.sh
tests/pin-twice.sh
tests/symlink.sh

index 267914d1591af30668f1281e63652bdd34d7d16a..a1a1fcc42233e9336373c729f2c1dd5d92b29b26 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,9 +1,11 @@
 ## [Unreleased]
+### Fixed
+- Really fix tests after restricted mode support update, whether or not the user has channels.
 
 
 ## [3.0.8] - 2022-04-15
 ### Fixed
-- Fix tests after restricted mode support update
+- Fix tests after restricted mode support update (Actually: break them worse)
 - Fix git-cache fetch URL
 
 
index de54e3d09b5356d52c4da741b30c3c434207cb96..bf83c18a1ba0fe733ddc4e50de27139c9db6bc71 100755 (executable)
@@ -14,7 +14,7 @@ python3 ./pinch.py pin "$conf"
 
 actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
 
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "bar"; src = builtins.storePath "\2"; \}'\'' '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all (-I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix )?-I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\2.tar.xz) --from-expression '\''f: f \{ name = "\2"; channelName = "bar"; src = builtins.storePath "\3"; \}'\'' '\''f: f \{ name = "\2"; channelName = "foo"; src = builtins.storePath "\3"; \}'\''$'
 
 if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
   echo PASS
index 1c857f407db89428a87207c9e5cd006a601146cb..b0721df1b0aeefc079c7184cc4c1341efedb86a3 100755 (executable)
@@ -8,7 +8,7 @@ python3 ./pinch.py pin "$conf"
 
 actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
 
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all (-I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix )?-I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\2.tar.xz) --from-expression '\''f: f \{ name = "\2"; channelName = "foo"; src = builtins.storePath "\3"; \}'\''$'
 
 if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
   echo PASS
index 52c59c8c34cbc94c7cde1f995e5c2733b2c55f4d..5d191ecee62e7fd723346c1e7e09f61c2b948596 100755 (executable)
@@ -18,7 +18,7 @@ actual_env_command=`python3 ./pinch.py update --dry-run "$conf" "$conf2"`
 
 rm -rf "$conf2"
 
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "bar"; src = builtins.storePath "\2"; \}'\'' '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all (-I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix )?-I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\2.tar.xz) --from-expression '\''f: f \{ name = "\2"; channelName = "bar"; src = builtins.storePath "\3"; \}'\'' '\''f: f \{ name = "\2"; channelName = "foo"; src = builtins.storePath "\3"; \}'\''$'
 
 if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
   echo PASS
index 7730bd6e9fc7dec11ed08e63154034722dfe45a6..fda548bc3dcc4f32b4e989016c3f5ef19d13d158 100755 (executable)
@@ -17,7 +17,7 @@ python3 ./pinch.py pin "$conf"
 
 actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
 
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all (-I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix )?-I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\2.tar.xz) --from-expression '\''f: f \{ name = "\2"; channelName = "foo"; src = builtins.storePath "\3"; \}'\''$'
 
 if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
   echo PASS
index 36e9c24c48a8500213789d3abd4867de0d9e4399..8b59794014ae93e0abb71ad5c39f8e3e87b8ceb2 100755 (executable)
@@ -14,7 +14,7 @@ python3 ./pinch.py pin "$conf"
 
 actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
 
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix -I pinch_tarball_for_link=('"$NIX_STORE_DIR"'/.{32}-link.tar.gz) -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\2.tar.xz) --from-expression '\''f: f \{ name = "link"; channelName = "bar"; src = builtins.storePath "\1"; \}'\'' '\''f: f \{ name = "\2"; channelName = "foo"; src = builtins.storePath "\3"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all (-I pinch_profile=/nix/var/nix/profiles/per-user/[^/]+/channels -I pinch_profile_manifest=/nix/store/.{32}-env-manifest.nix )?-I pinch_tarball_for_link=('"$NIX_STORE_DIR"'/.{32}-link.tar.gz) -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\3.tar.xz) --from-expression '\''f: f \{ name = "link"; channelName = "bar"; src = builtins.storePath "\2"; \}'\'' '\''f: f \{ name = "\3"; channelName = "foo"; src = builtins.storePath "\4"; \}'\''$'
 
 if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
   echo PASS