summaryrefslogtreecommitdiff
path: root/tests/plugins/project/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-04-29 23:35:53 +0800
committerruki <[email protected]>2020-04-29 15:35:21 +0800
commitcf92ed9d8ed9d833458ffcb94466f7b7c32c91b7 (patch)
treef34ff62cbe64b8889d89096376ec94364a359135 /tests/plugins/project/test.lua
parentcc8239ff557e66277660b417521b882b30a6c567 (diff)
improve test
Diffstat (limited to 'tests/plugins/project/test.lua')
-rw-r--r--tests/plugins/project/test.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/plugins/project/test.lua b/tests/plugins/project/test.lua
index e64142f7c..e3295d68d 100644
--- a/tests/plugins/project/test.lua
+++ b/tests/plugins/project/test.lua
@@ -5,7 +5,7 @@ import("core.platform.environment")
function test_vsxmake(t)
- if os.subhost() ~= "windows" then
+ if not is_subhost("windows") then
return t:skip("wrong host platform")
end
@@ -23,10 +23,9 @@ function test_vsxmake(t)
config.set("arch", arch, {readonly = true, force = true})
config.check()
platform.load(config.plat())
- local vs = config.get("vs")
- environment.enter("toolchains")
-- create sln & vcxproj
+ local vs = config.get("vs")
local vstype = "vsxmake" .. vs
os.execv("xmake", {"project", "-k", vstype, "-a", arch})
os.cd(vstype)
@@ -35,22 +34,23 @@ function test_vsxmake(t)
try
{
function ()
+ environment.enter("toolchains")
os.exec("msbuild /P:XmakeDiagnosis=true /P:XmakeVerbose=true")
+ environment.leave("toolchains")
end,
catch
{
function ()
- io.write("--- sln file ---\n")
+ print("--- sln file ---")
io.cat(projname .. "_" .. vstype .. ".sln")
- io.write("--- vcx file ---\n")
+ print("--- vcx file ---")
io.cat(projname .. "/" .. projname .. ".vcxproj")
- io.write("--- filter file ---\n")
+ print("--- filter file ---")
io.cat(projname .. "/" .. projname .. ".vcxproj.filters")
raise("msbuild failed")
end
}
}
- environment.leave("toolchains")
-- clean up
os.cd(os.scriptdir())