commit 6b7f77c9f144585e6d8e226ebfe547bb2002f03f parent 3af2c9aa8f75598c4d04d41b042a4d65ed1f81e7 Author: citbl <citbl@citbl.org> Date: Sat, 1 Nov 2025 17:27:03 +1000 faster tests Diffstat:
| M | makefile | | | 14 | +++++++++----- |
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/makefile b/makefile @@ -41,12 +41,16 @@ release: clean check: clean cc ${STD} -g -Wall -Wextra -fsanitize=address -fsanitize=undefined -o ${BIN} ${SRC} ${LIB} +# test: clean fast +# +@printf '%s\0' ex*.ox \ +# | xargs -0 -P100 -n1 sh -c 'printf "%s\n" "$$1" 1>&2; exec ./$(BIN) --quiet "$$1" >/dev/null' sh + +JOBS ?= $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 16) + test: clean fast - @printf "%s\n" ex*.ox | xargs -P0 -n20 -I{} bash -c '\ - err=$$(mktemp); \ - ./$(BIN) --quiet "$$1" >/dev/null 2>$$err || { echo "FAIL: $$1"; cat $$err; rm -f $$err; exit 1; }; \ - if [ -s $$err ]; then echo "FAIL: $$1"; cat $$err; rm -f $$err; exit 1; fi; \ - echo "$$1"; rm -f $$err' sh {} + +@find . -maxdepth 1 -name 'ex*.ox' -print0 \ + | xargs -0 -r -P$(JOBS) -n1 sh -c 'printf "%s\n" "$$1" 1>&2; exec ./$(BIN) --quiet "$$1" >/dev/null' sh + test-hmap: clean default MallocNanoZone=0 ./oxc --test-hmap