Created
November 3, 2024 09:46
-
-
Save dineshadepu/7714dd0f3c622862eb267a62c10c1e86 to your computer and use it in GitHub Desktop.
Run tests in Cabana if ctests are not working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define the build directory containing binaries | |
BUILD_DIR := /home/dineshadepu/life/softwares/Cabana_package_template/build | |
# for mac os | |
BUILD_DIR := /Users/dineshadepu/life/softwares/Cabana_package_template/build | |
# Find all binaries in BUILD_DIR with "test" in the name (Ubuntu compatible) | |
TEST_BINARIES := $(shell find $(BUILD_DIR) -type f -executable -name "*test*") | |
# for mac os | |
# TEST_BINARIES := $(shell find $(BUILD_DIR) -type f -perm +111 -name "*test*") | |
# Target to list all test binaries | |
.PHONY: list_tests | |
list_tests: | |
@echo "Test binaries found:" | |
@for test in $(TEST_BINARIES); do echo $$test; done | |
# Target to run all test binaries | |
.PHONY: run_tests | |
run_tests: | |
@echo "Running all test binaries..." | |
@for test in $(TEST_BINARIES); do \ | |
echo "Running $$test"; \ | |
$$test; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment