summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-03-10 22:14:49 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-03-10 22:14:49 +0300
commit29b985290c171926c765c571e8711276c4d9aae0 (patch)
treedac0da25c91eaab20415095d670af2bb53287955
parent582c0f233ba20810e9a5d95441fa6630649f7128 (diff)
downloadProject-Tick-29b985290c171926c765c571e8711276c4d9aae0.tar.gz
Project-Tick-29b985290c171926c765c571e8711276c4d9aae0.zip
ported test file to bin folder
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
-rw-r--r--tests/test.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test.sh b/tests/test.sh
index 9bfc009a99..004bd9f372 100644
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -20,13 +20,16 @@ pass() {
printf "${GREEN}PASS: %s${NC}\n" "$1"
}
-# Compile helper if not already there
+# Build a ps-specific helper in shared out/ roots to avoid name collisions
+# with other test suites (e.g. pkill also has a spin_helper).
HELPER_DIR="$(dirname "$0")"
OUT_DIR="$(dirname "${PS_BIN}")"
-HELPER_BIN="${OUT_DIR}/spin_helper"
+HELPER_BIN="${OUT_DIR}/ps_spin_helper"
+HELPER_SRC="${HELPER_DIR}/spin_helper.c"
+CC_BIN="${CC:-cc}"
-if [ ! -f "${HELPER_BIN}" ]; then
- cc -O2 "${HELPER_DIR}/spin_helper.c" -o "${HELPER_BIN}" || fail "failed to compile spin_helper"
+if [ ! -x "${HELPER_BIN}" ] || [ "${HELPER_SRC}" -nt "${HELPER_BIN}" ]; then
+ "${CC_BIN}" -O2 "${HELPER_SRC}" -o "${HELPER_BIN}" || fail "failed to compile spin_helper"
fi
# 1. Basic sanity: run without arguments