Repository navigation
Expand file tree
/
Copy pathRakefile
More file actions
53 lines (44 loc) · 1.46 KB
/
Copy pathRakefile
File metadata and controls
53 lines (44 loc) · 1.46 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
require "rake/testtask"
# Tests have three tiers (see test/CLAUDE.md guidance):
#
# * Fast structural tests run by default.
# * FORMULA_EVAL=1 — value+color regression via LibreOffice headless
# recalc (~7s/case). Gated behind the env var so the default `rake
# test` stays snappy.
# * E2E_RUN=1 — real end-to-end CLI + executor walk through xlsx
# (~1s per executor tick). Same opt-in story.
#
# `bin/test` reads MT_CPU/NCPU for parallelism (fork-per-class +
# thread-per-test). The rake tasks just delegate; tune via env if needed.
def run_bin_test(env = {}, args = [])
cmd = ["bin/test", *args]
sh env, *cmd
end
desc "Run the fast structural test suite (default)"
task :test do
run_bin_test
end
namespace :test do
desc "Run the fast structural test suite"
task :fast do
run_bin_test
end
desc "Run the formula-eval value+color regression suite (LibreOffice recalc)"
task :formula_eval do
run_bin_test("FORMULA_EVAL" => "1")
end
desc "Run the end-to-end CLI+executor suite (LibreOffice + python executor)"
task :e2e do
run_bin_test("E2E_RUN" => "1")
end
desc "Run every test (fast + formula_eval + e2e)"
task :all do
run_bin_test("FORMULA_EVAL" => "1", "E2E_RUN" => "1")
end
desc "Run the full suite sequentially (debug-friendly, ~12m on this box)"
task :serial do
run_bin_test({ "FORMULA_EVAL" => "1", "E2E_RUN" => "1",
"NCPU" => "1", "MT_CPU" => "1" })
end
end
task default: :test