[env]
# Limit test parallelism to prevent resource exhaustion
RUST_TEST_THREADS = "4"

# Reduce property test cases for development
PROPTEST_CASES = "32"
PROPTEST_MAX_SHRINK_ITERS = "100"

# Enable for debugging test memory issues
# RUST_BACKTRACE = "1"

[alias]
# Test aliases with controlled parallelism
t = "test --lib -- --test-threads=4"
t1 = "test --lib -- --test-threads=1"
tq = "test --lib -- --test-threads=4 --quiet"
th = "test --lib -- --test-threads=1 --nocapture"

# Test categories
test-unit = "test --lib -- --test-threads=4"
test-prop = "test property_ --lib -- --test-threads=2"
test-heavy = "test --lib -- --ignored --test-threads=1"
test-quick = "test --lib -- --test-threads=4 --skip property_"

# Coverage aliases - Toyota Way: Easy access to quality metrics
cov = "llvm-cov --html"
cov-report = "llvm-cov report"
cov-json = "llvm-cov --json"
cov-lcov = "llvm-cov --lcov --output-path lcov.info"
cov-open = "llvm-cov --html --open"

[build]
# Optimize build for test runs
incremental = true

[profile.test]
# Optimize test builds for faster compilation
opt-level = 1
debug = 1