Files

16 lines
1.6 KiB
Markdown

# Tests
Run the compiler checks with `scripts/test_capy_native.sh`. The suite reports elapsed time for each stage. It runs all assertions and compiles every tracked site fixture on each invocation.
The suite caches native test builds under `tmp/`. The build cache checks dependency contents, including system headers, compiler identity, arguments, environment, and executable contents. It never caches test results. Failed builds remove the cache manifest. Per-output locks protect concurrent builds. The native suite also locks its artifact directory.
Test binaries use `-O1` without `NDEBUG`. Assertions remain enabled. The suite uses a release compiler for fixture compilation. The first build costs more than a repeat run.
Run scaling benchmarks with `scripts/test_capy_native.sh --benchmarks`, or run `scripts/benchmark_capy_compiler_scaling.sh` directly. Routine correctness checks do not run benchmarks.
Run `python3 scripts/test_native_build_cache.py` to check cache invalidation, failed builds, concurrent builds, and executable corruption.
Run `scripts/test_capy_artifact_golden.sh` to compare Wasm and source-map goldens. It compiles with at most four workers. Each invocation owns a temporary directory. The golden check remains independent of the native suite's compiler.
Run `python3 scripts/test_capy_format.py site --capyc bin/capyc --allow-backtrace` to verify formatting. It checks idempotence for every file. Changed files require original and formatted compilations. Unchanged files require only one compilation. The only allowed Wasm difference is the approved backtrace fixture's embedded source locations.