File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
tests/benchmarks/build_targets Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,17 @@ function test_build(t)
66
66
local meson = find_tool (" meson" )
67
67
if meson then
68
68
os .tryrm (" build" )
69
- local meson_dt = os .mclock ()
69
+ local meson_setup_dt = os .mclock ()
70
70
os .runv (meson .program , {" setup" , " build" })
71
+ meson_setup_dt = os .mclock () - meson_setup_dt
72
+
73
+ -- ccache will cache object files globally, which may affect the results of the second run.
74
+ io .replace (" build/build.ninja" , " ccache" , " " )
75
+
76
+ local meson_build_dt = os .mclock ()
71
77
os .runv (meson .program , {" compile" , " -C" , " build" })
72
- meson_dt = os .mclock () - meson_dt
78
+ meson_build_dt = os .mclock () - meson_build_dt
79
+ local meson_dt = meson_setup_dt + meson_build_dt
73
80
print (" build targets/30: meson: %d ms" , meson_dt )
74
81
t :require ((meson_dt > xmake_dt ) or (meson_dt + 2000 > xmake_dt ))
75
82
end
You can’t perform that action at this time.
0 commit comments