-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (69 loc) · 2.97 KB
/
Copy pathMakefile
File metadata and controls
91 lines (69 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.SHELL: /bin/bash
.PHONY: test test-all test-fuzz test-fuzz-quick test-fuzz-ci ci-full
# Default: run all non-ignored tests
test:
cargo test
# Run all tests including ignored (slow/requires-cc)
test-all:
cargo test -- --include-ignored
# ============================================================
# Fuzz targets
# ============================================================
# Quick fuzz: run each proptest target with minimal iterations
test-fuzz-quick:
PROPTEST_CASES=10 cargo test fuzz_ -- --nocapture
# Full fuzz: run each proptest target with standard iterations
test-fuzz:
PROPTEST_CASES=100 cargo test fuzz_ -- --nocapture
# CI fuzz: aggressive iterations for continuous integration
test-fuzz-ci:
PROPTEST_CASES=1000 cargo test fuzz_ 2>&1
# Run all fuzz corpus seed tests
test-fuzz-corpus:
cargo test fuzz::corpus -- --nocapture
# Run dual-path consistency tests (requires cc)
test-fuzz-dual-path:
cargo test fuzz::test_dual_path -- --ignored --nocapture
# Run type-soundness property tests
test-typesoundness:
PROPTEST_CASES=100 cargo test fuzz::target_typesoundness -- --nocapture 2>&1
# Run differential fuzzer (random program generation, compare interp vs codegen)
test-differential:
PROPTEST_CASES=100 cargo test fuzz::target_differential -- --nocapture --include-ignored 2>&1
test-differential-ci:
PROPTEST_CASES=1000 cargo test fuzz::target_differential 2>&1
# ============================================================
# CI gates
# ============================================================
ci-check:
cargo check
cargo clippy -- -D warnings 2>/dev/null || true
cargo fmt -- --check 2>/dev/null || true
ci-test:
cargo test -- --test-threads=4
ci-valgrind:
cargo test codegen_e2e dual_backend -- --test-threads=1 --include-ignored
ci-sanitize:
RUSTFLAGS="-Z sanitizer=address" cargo test codegen_e2e -- --test-threads=1 --include-ignored 2>&1 | tail -3
RUSTFLAGS="-Z sanitizer=undefined" cargo test codegen_e2e -- --test-threads=1 --include-ignored 2>&1 | tail -3
ci-miri:
cargo miri test interp ffi -- --test-threads=4
ci-cppcheck:
cppcheck --enable=all --inconclusive --suppress=missingIncludeSystem src/runtime/mimi_runtime.c 2>&1 || true
test-ffi-contract:
PROPTEST_CASES=100 cargo test fuzz::target_ffi_contract -- --nocapture --include-ignored 2>&1
ci-full: ci-check ci-test
$(MAKE) ci-valgrind 2>/dev/null || echo "[SKIP] valgrind not available"
$(MAKE) ci-cppcheck 2>/dev/null || echo "[SKIP] cppcheck not available"
# ============================================================
# Quick smoke-test (no proptest, just corpus + regression)
# ============================================================
test-fuzz-regression:
cargo test fuzz::corpus -- --nocapture
cargo test fuzz::test_exhaustive -- --nocapture
cargo test fuzz::test_cap -- --nocapture
cargo test fuzz::test_ffi -- --nocapture
cargo test target_parser -- --nocapture
cargo test target_typechecker -- --nocapture
cargo test target_interpreter -- --nocapture
cargo test target_codegen -- --nocapture