fix: fix MacOS test launching

* Update makefile to use appropriate arguments to find executables on
  macos systems.
* Add `set -e` to make sure that the tests crash if something goes wrong
  in the build or test of the macos job of the CI.

closes #783
This commit is contained in:
Luis Montero
2022-11-24 14:14:10 +01:00
committed by Luis Montero
parent 3bade6603a
commit 30be8cf4ae
2 changed files with 12 additions and 2 deletions

View File

@@ -256,6 +256,7 @@ jobs:
# and will at least give minimum confidence that the compiler works in PRs
- name: Build
run: |
set -e
cd compiler
echo "Debug: ccache statistics (prior to the build):"
ccache -s
@@ -273,6 +274,7 @@ jobs:
- name: Test
if: github.event_name == 'push'
run: |
set -e
cd compiler
echo "Debug: ccache statistics (prior to the tests):"
ccache -s

View File

@@ -25,6 +25,7 @@ CONCRETE_CORE_FFI_VERSION?=0.2.0
ML_BENCH_SUBSET_ID=
# Find OS
OS=undefined
ifeq ($(shell uname), Linux)
OS=linux
@@ -32,6 +33,13 @@ else ifeq ($(shell uname), Darwin)
OS=darwin
endif
# Setup find arguments for MacOS
ifeq ($(OS), darwin)
FIND_EXECUTABLE_ARG=-perm +111
else
FIND_EXECUTABLE_ARG=-executable
endif
ARCHITECTURE=undefined
ifeq ($(shell uname -m), arm64)
ARCHITECTURE=aarch64
@@ -211,7 +219,7 @@ build-unit-tests: build-initialized
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 | xargs -n1 ./run_test_bin.sh
find $(BUILD_DIR)/tools/concretelang/tests/unit_tests -name unit_tests_concretelang* $(FIND_EXECUTABLE_ARG) -type f | xargs -n1 ./run_test_bin.sh
## python-tests
@@ -230,7 +238,7 @@ run-rust-tests: rust-bindings
build-end-to-end-tests: build-end-to-end-jit-test 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 | xargs -n1 ./run_test_bin.sh
find $(BUILD_DIR)/tools/concretelang/tests/end_to_end_tests -name end_to_end* $(FIND_EXECUTABLE_ARG) -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