From 283aeb144f22ede495e2f70ef92bb6e323355dec Mon Sep 17 00:00:00 2001 From: Andrei Kashin Date: Thu, 8 Feb 2024 12:17:15 +0000 Subject: [PATCH] Use absolute paths in run-tests-zkasm.js --- ci/test-all-zkasm.sh | 2 +- ci/test-zkasm.sh | 2 +- tests/zkasm/run-tests-zkasm.js | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/test-all-zkasm.sh b/ci/test-all-zkasm.sh index 657ef7c37e49..ee5dab7033f6 100755 --- a/ci/test-all-zkasm.sh +++ b/ci/test-all-zkasm.sh @@ -6,7 +6,7 @@ set -eux ALL_ARGS=$@ function run_tests() { - ./ci/test-zkasm.sh $1 $ALL_ARGS + ./ci/test-zkasm.sh $(pwd)/$1 $ALL_ARGS } run_tests "cranelift/zkasm_data" diff --git a/ci/test-zkasm.sh b/ci/test-zkasm.sh index 13ffa569160c..6db18d6bfdff 100755 --- a/ci/test-zkasm.sh +++ b/ci/test-zkasm.sh @@ -14,5 +14,5 @@ ALL_ARGS=$@ # The first argument is expected to be a path to a folder with tests. TEST_PATH=$1 TEST_RESULTS_PATH=$(mktemp) -npm test --prefix tests/zkasm "../../${TEST_PATH}/generated" $TEST_RESULTS_PATH +npm test --prefix tests/zkasm "${TEST_PATH}/generated" $TEST_RESULTS_PATH python3 ci/zkasm-result.py $ALL_ARGS < $TEST_RESULTS_PATH diff --git a/tests/zkasm/run-tests-zkasm.js b/tests/zkasm/run-tests-zkasm.js index a95c4aa3303d..77ade2d25ea5 100644 --- a/tests/zkasm/run-tests-zkasm.js +++ b/tests/zkasm/run-tests-zkasm.js @@ -35,8 +35,7 @@ async function main() { const cmPols = await compilePil(); // Get all zkasm files - const pathZkasm = path.join(process.cwd(), process.argv[2]); - const files = await getTestFiles(pathZkasm); + const files = await getTestFiles(process.argv[2]); // Run all zkasm files let testResults = [];