summaryrefslogtreecommitdiff
path: root/tests/projects
diff options
context:
space:
mode:
authorruki <[email protected]>2026-04-24 23:20:44 +0800
committerruki <[email protected]>2026-04-24 23:20:44 +0800
commit388c1813adcb65e09828cdbc4497c931b504d968 (patch)
tree625a9114bc16d91edfc9ce3483b723db4f37b457 /tests/projects
parente7d86ead6c2760d1ca3548093673ef1db99e85c3 (diff)
fix rust buildrust
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/rust/static_library/test.lua7
1 files changed, 7 insertions, 0 deletions
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