diff options
Diffstat (limited to 'tests/plugins/project/test.lua')
| -rw-r--r-- | tests/plugins/project/test.lua | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/tests/plugins/project/test.lua b/tests/plugins/project/test.lua index b647d52d9..1df87394e 100644 --- a/tests/plugins/project/test.lua +++ b/tests/plugins/project/test.lua @@ -28,8 +28,30 @@ function test_vsxmake(t) os.execv("xmake", {"project", "-k", vstype, "-a", arch}) os.cd(vstype) -- run msbuild - os.exec("msbuild /t:show") - os.exec("msbuild") + try + { + function () + return os.iorun("msbuild /P:XmakeDiagnosis=true /P:XmakeVerbose=true") + end, + finally + { + function (ok, stdout, stderr) + if ok then + return + end + print("run msbuild for %s", vstype) + io.write("--- msbuild output ---") + io.write(stdout, "\n", stderr) + io.write("--- sln file ---") + io.write(io.readfile("c_" .. vstype .. ".sln"), "\n") + io.write("--- vcx file ---") + io.write(io.readfile("project/project.vcxproj"), "\n") + io.write("--- filter file ---") + io.write(io.readfile("project/project.vcxprok.filters"), "\n") + raise("msbuild failed") + end + } + } environment.leave("toolchains") -- clean up os.cd("..") |
