diff options
| author | OpportunityLiu <[email protected]> | 2019-07-16 13:50:39 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-16 13:50:39 +0800 |
| commit | 6147d0287aa0fee9862308512fb39e6f10f0bde8 (patch) | |
| tree | bb4b647bd1cb2bdbe77d9011b948aa577804e581 /tests/plugins/project/test.lua | |
| parent | 5416165e691abf933a3b045ed53e8592f8a6e836 (diff) | |
fix log
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("..") |
