From e7c397a48518d89825a52293812bef6360b53e7b Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 27 Sep 2020 12:43:26 +0200 Subject: [PATCH] run-tests: rename scriptDir -> testDir Needed for container support. --- test/run-tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index 2275060..410f566 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -62,9 +62,9 @@ numCPUs=${numCPUs:-$(nproc)} # Min. 800 MiB needed to avoid 'out of memory' errors memoryMiB=${memoryMiB:-2048} -scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd) +testDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd) -export NIX_PATH=nixpkgs=$(nix eval --raw -f "$scriptDir/../pkgs/nixpkgs-pinned.nix" nixpkgs) +export NIX_PATH=nixpkgs=$(nix eval --raw -f "$testDir/../pkgs/nixpkgs-pinned.nix" nixpkgs) # Run the test. No temporary files are left on the host system. run() { @@ -72,7 +72,7 @@ run() { export TMPDIR=$(mktemp -d /tmp/nix-bitcoin-test.XXX) trap "rm -rf $TMPDIR" EXIT - nix-build --out-link $TMPDIR/driver -E "(import \"$scriptDir/tests.nix\" { scenario = \"$scenario\"; }).vm" -A driver + nix-build --out-link $TMPDIR/driver -E "(import \"$testDir/tests.nix\" { scenario = \"$scenario\"; }).vm" -A driver # Variable 'tests' contains the Python code that is executed by the driver on startup if [[ $1 == --interactive ]]; then @@ -134,7 +134,7 @@ exprForCI() { vmTestNixExpr() { cat <