From 01c9fd99704652d6c1a70798002f970b1bea9f5a Mon Sep 17 00:00:00 2001 From: Brodey Newman Date: Mon, 6 Jan 2025 04:02:59 +0000 Subject: [PATCH] fix: tests --- local.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/local.sh b/local.sh index 8ff0897..7962fb7 100755 --- a/local.sh +++ b/local.sh @@ -232,7 +232,23 @@ test_ci() { cmake --build . set_paths - test + + build_tests + + export SCUDA_SERVER=0.0.0.0 + + echo "running tests at: $libscuda_path" + echo -e "\n\033[1mRunning test(s)...\033[0m" + + for test in "${tests[@]}"; do + func_name=$(eval "echo \${${test}[function]}") + pass_message=$(eval "echo \${${test}[pass]}") + + if ! eval "$func_name \"$pass_message\""; then + echo -e "\033[31mTest failed. Exiting...\033[0m" + return 1 + fi + done } server() {