Commit a67eb8a7

a67eb8a72bf9Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 7 months ago · 20 files · ~1 modified · -12 deleted

Description

refactor: separate test/ (features) from benchmark/ (performance)

  • test/ now contains only feature/correctness tests (65 files)
  • benchmark/ contains all performance benchmarks (47 files)
  • Move shootout benchmarks (binary_trees, fannkuch, nbody, etc.) to benchmark/
  • Remove benchmark duplicates from test/
  • Decouple make test and make bench from bootstrap (require pre-built spinel_codegen, no automatic rebuild)

Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]

Details

Commit
a67eb8a72bf9
Parent
c6de0c16d19f

MakefilemodifiedView file

@@ -4,8 +4,8 @@
44 # make Build everything (parser + bootstrap compiler)
55 # make parse Build C parser only
66 # make bootstrap Bootstrap the compiler backend
7-# make test Run all tests
8-# make bench Run all benchmarks
7+# make test Run feature tests (requires bootstrap first)
8+# make bench Run benchmarks (requires bootstrap first)
99 # make clean Remove built binaries
1010
1111 CC ?= cc
@@ -83,7 +83,8 @@
8383 @mkdir -p build
8484 $(CC) -c -O2 -Wno-all -Ilib lib/sp_bigint.c -o build/sp_bigint.o
8585
86-test: spinel_parse spinel_codegen build/sp_bigint.o $(RE_LIB)
86+test: spinel_parse build/sp_bigint.o $(RE_LIB)
87+ @if [ ! -f spinel_codegen ]; then echo "Run 'make bootstrap' first"; exit 1; fi
8788 @pass=0; fail=0; err=0; \
8889 for f in test/*.rb; do \
8990 bn=$$(basename "$$f" .rb); \
@@ -105,7 +106,8 @@
105106 rm -f /tmp/_sp_t.ast /tmp/_sp_t.c /tmp/_sp_t_bin; \
106107 echo "Tests: $$pass pass, $$fail fail, $$err error"
107108
108-bench: spinel_parse spinel_codegen build/sp_bigint.o $(RE_LIB)
109+bench: spinel_parse build/sp_bigint.o $(RE_LIB)
110+ @if [ ! -f spinel_codegen ]; then echo "Run 'make bootstrap' first"; exit 1; fi
109111 @pass=0; fail=0; skip=0; \
110112 for f in benchmark/*.rb; do \
111113 bn=$$(basename "$$f" .rb); \