diff options
author | John Hodge <tpg@mutabah.net> | 2017-09-23 15:57:41 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2017-09-23 15:57:41 +0800 |
commit | cb2430a01df314896aeaa4f99ab77dd1a9a3e93f (patch) | |
tree | 95bdb51e01e670cdae93ebaecc1ddcc6d2b75407 | |
parent | f28c1a509fb2422dfec6162cf0b05d7eeffcef80 (diff) | |
download | mrust-cb2430a01df314896aeaa4f99ab77dd1a9a3e93f.tar.gz |
testrunner - Fiddling around
-rw-r--r-- | tools/testrunner/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/testrunner/main.cpp b/tools/testrunner/main.cpp index 81dc4686..d6d2a279 100644 --- a/tools/testrunner/main.cpp +++ b/tools/testrunner/main.cpp @@ -39,13 +39,15 @@ bool run_compiler(const ::helpers::path& source_file, const ::helpers::path& out { ::std::vector<const char*> args; args.push_back("mrustc"); + args.push_back("-L"); + args.push_back("output"); if(libdir.is_valid()) { args.push_back("-L"); args.push_back(libdir.str().c_str()); } args.push_back(source_file.str().c_str()); - args.push_back("--out-dir"); + args.push_back("-o"); args.push_back(output.str().c_str()); run_executable(MRUSTC_PATH, args); @@ -135,9 +137,10 @@ int main(int argc, const char* argv[]) { run_compiler(file, depdir); } - run_compiler(test.m_path, outdir, outdir); + auto outfile = outdir / test.m_name + ".exe"; + run_compiler(test.m_path, outfile, outdir); // - Run the test - run_executable(outdir / test.m_name, {}); + run_executable(outfile, {}); #ifndef _WIN32 } closedir(dp); @@ -250,8 +253,8 @@ bool run_executable(const ::helpers::path& exe_name, const ::std::vector<const c si.cb = sizeof(si); si.dwFlags = STARTF_USESTDHANDLES; si.hStdInput = NULL; + si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); si.hStdError = GetStdHandle(STD_ERROR_HANDLE); - si.hStdError = GetStdHandle(STD_OUTPUT_HANDLE); PROCESS_INFORMATION pi = { 0 }; CreateProcessA(exe_name.str().c_str(), (LPSTR)cmdline_str.c_str(), NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi); CloseHandle(si.hStdOutput); |