From ff3a3cbe8b53531ab7346ba9d2c9ed42dabc58fd Mon Sep 17 00:00:00 2001 From: youben11 Date: Wed, 27 Jul 2022 08:49:33 +0100 Subject: [PATCH] fix: fail tests if any of the test binaries fail --- compiler/Makefile | 4 ++-- compiler/run_test_bin.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 compiler/run_test_bin.sh diff --git a/compiler/Makefile b/compiler/Makefile index 67cf36c87..b5231e0fe 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -134,7 +134,7 @@ build-unit-tests: cmake --build $(BUILD_DIR) --target ConcretelangUnitTests run-unit-tests: build-unit-tests - find $(BUILD_DIR)/tools/concretelang/tests/unit_tests -name unit_tests_concretelang* -executable -type f -exec {} \; + find $(BUILD_DIR)/tools/concretelang/tests/unit_tests -name unit_tests_concretelang* -executable -type f | xargs -n1 ./run_test_bin.sh ## python-tests @@ -149,7 +149,7 @@ test-compiler-file-output: concretecompiler build-end-to-end-tests: build-end-to-end-jit-test build-end-to-end-jit-clear-tensor build-end-to-end-jit-fhe build-end-to-end-jit-encrypted-tensor build-end-to-end-jit-fhelinalg build-end-to-end-jit-lambda run-end-to-end-tests: build-end-to-end-tests - find $(BUILD_DIR)/tools/concretelang/tests/end_to_end_tests -name end_to_end* -executable -type f -exec {} \; + find $(BUILD_DIR)/tools/concretelang/tests/end_to_end_tests -name end_to_end* -executable -type f | xargs -n1 ./run_test_bin.sh build-end-to-end-jit-test: build-initialized cmake --build $(BUILD_DIR) --target end_to_end_jit_test diff --git a/compiler/run_test_bin.sh b/compiler/run_test_bin.sh new file mode 100755 index 000000000..5c1437908 --- /dev/null +++ b/compiler/run_test_bin.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +$1