From c2154d4c8422ddc1c201d503bb52edff854af2ad Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 Aug 2017 14:28:25 +0200 Subject: Rename a few configuration options In particular, drop the "build-" and "gc-" prefixes which are pointless. So now you can say nix build --no-sandbox instead of nix build --no-build-use-sandbox --- tests/build-remote.sh | 2 +- tests/init.sh | 4 +--- tests/linux-sandbox.sh | 2 +- tests/logging.sh | 2 +- tests/multiple-outputs.sh | 2 +- tests/setuid.nix | 16 ++++++++-------- tests/shell.shebang.sh | 2 +- tests/timeout.sh | 4 ++-- 8 files changed, 16 insertions(+), 18 deletions(-) (limited to 'tests') diff --git a/tests/build-remote.sh b/tests/build-remote.sh index 927a217f3..e27ce7e25 100644 --- a/tests/build-remote.sh +++ b/tests/build-remote.sh @@ -13,7 +13,7 @@ rm -rf $TEST_ROOT/store0 $TEST_ROOT/store1 export NIX_CONF_DIR=$TEST_ROOT/etc2 mkdir -p $NIX_CONF_DIR echo " -build-sandbox-paths = /nix/store +sandbox-paths = /nix/store sandbox-build-dir = /build-tmp " > $NIX_CONF_DIR/nix.conf diff --git a/tests/init.sh b/tests/init.sh index 4571b75b8..41cca047d 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -15,9 +15,7 @@ mkdir "$NIX_CONF_DIR" cat > "$NIX_CONF_DIR"/nix.conf <succeed('nix-build --option build-use-sandbox false -E \'(with import {}; runCommand "foo" {} " + $machine->succeed('nix-build --option sandbox false -E \'(with import {}; runCommand "foo" {} " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id ")\' '); @@ -30,7 +30,7 @@ makeTest { $machine->succeed("rm /tmp/id"); # Creating a setuid binary should fail. - $machine->fail('nix-build --option build-use-sandbox false -E \'(with import {}; runCommand "foo" {} " + $machine->fail('nix-build --option sandbox false -E \'(with import {}; runCommand "foo" {} " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id chmod 4755 /tmp/id @@ -41,7 +41,7 @@ makeTest { $machine->succeed("rm /tmp/id"); # Creating a setgid binary should fail. - $machine->fail('nix-build --option build-use-sandbox false -E \'(with import {}; runCommand "foo" {} " + $machine->fail('nix-build --option sandbox false -E \'(with import {}; runCommand "foo" {} " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id chmod 2755 /tmp/id @@ -52,7 +52,7 @@ makeTest { $machine->succeed("rm /tmp/id"); # The checks should also work on 32-bit binaries. - $machine->fail('nix-build --option build-use-sandbox false -E \'(with import { system = "i686-linux"; }; runCommand "foo" {} " + $machine->fail('nix-build --option sandbox false -E \'(with import { system = "i686-linux"; }; runCommand "foo" {} " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id chmod 2755 /tmp/id @@ -63,7 +63,7 @@ makeTest { $machine->succeed("rm /tmp/id"); # The tests above use fchmodat(). Test chmod() as well. - $machine->succeed('nix-build --option build-use-sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " + $machine->succeed('nix-build --option sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id perl -e \"chmod 0666, qw(/tmp/id) or die\" @@ -73,7 +73,7 @@ makeTest { $machine->succeed("rm /tmp/id"); - $machine->fail('nix-build --option build-use-sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " + $machine->fail('nix-build --option sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id perl -e \"chmod 04755, qw(/tmp/id) or die\" @@ -84,7 +84,7 @@ makeTest { $machine->succeed("rm /tmp/id"); # And test fchmod(). - $machine->succeed('nix-build --option build-use-sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " + $machine->succeed('nix-build --option sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id perl -e \"my \\\$x; open \\\$x, qw(/tmp/id); chmod 01750, \\\$x or die\" @@ -94,7 +94,7 @@ makeTest { $machine->succeed("rm /tmp/id"); - $machine->fail('nix-build --option build-use-sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " + $machine->fail('nix-build --option sandbox false -E \'(with import {}; runCommand "foo" { buildInputs = [ perl ]; } " mkdir -p $out cp ${pkgs.coreutils}/bin/id /tmp/id perl -e \"my \\\$x; open \\\$x, qw(/tmp/id); chmod 04777, \\\$x or die\" diff --git a/tests/shell.shebang.sh b/tests/shell.shebang.sh index c9a83aaf8..a6c4bc945 100755 --- a/tests/shell.shebang.sh +++ b/tests/shell.shebang.sh @@ -1,4 +1,4 @@ #! @ENV_PROG@ nix-shell -#! nix-shell -I nixpkgs=shell.nix --option build-use-substitutes false +#! nix-shell -I nixpkgs=shell.nix --option use-substitutes false #! nix-shell --pure -i bash -p foo bar echo "$(foo) $(bar) $@" diff --git a/tests/timeout.sh b/tests/timeout.sh index 2b864b86d..d3d85200f 100644 --- a/tests/timeout.sh +++ b/tests/timeout.sh @@ -15,7 +15,7 @@ if ! echo "$messages" | grep -q "timed out"; then exit 1 fi -if nix-build -Q timeout.nix -A infiniteLoop --option build-max-log-size 100; then +if nix-build -Q timeout.nix -A infiniteLoop --option max-build-log-size 100; then echo "build should have failed" exit 1 fi @@ -30,7 +30,7 @@ if nix-build timeout.nix -A closeLog; then exit 1 fi -if nix build -f timeout.nix silent --option build-max-silent-time 2; then +if nix build -f timeout.nix silent --max-silent-time 2; then echo "build should have failed" exit 1 fi -- cgit v1.2.3