From 388c1813adcb65e09828cdbc4497c931b504d968 Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 24 Apr 2026 23:20:44 +0800 Subject: fix rust build --- tests/projects/rust/static_library/test.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/projects/rust') diff --git a/tests/projects/rust/static_library/test.lua b/tests/projects/rust/static_library/test.lua index 060aa6ca5..5f1a5d5be 100644 --- a/tests/projects/rust/static_library/test.lua +++ b/tests/projects/rust/static_library/test.lua @@ -1,6 +1,13 @@ function main(t) if is_host("macosx") and os.arch() ~= "arm64" then t:build() + local targetfile = os.files("build/**/release/test")[1] + assert(targetfile and os.isfile(targetfile), "target file not found!") + local mtime = os.mtime(targetfile) + os.sleep(1000) + os.touch("src/foo.rs", {mtime = os.time()}) + t:build() + assert(os.mtime(targetfile) > mtime, "target file should be rebuilt after rust dependency changes!") else return t:skip("wrong host platform") end -- cgit v1.3.1