Provide more info in case of failed test

This commit is contained in:
Antony Polukhin
2017-01-26 23:23:51 +03:00
parent ea6e7fabe9
commit 843c6e4291

View File

@@ -60,8 +60,9 @@ int main(int argc, const char* argv[]) {
command_1 = command_1.parent_path() / (command_1.stem().string() + "_1" + command_1.extension().string());
boost::filesystem::copy_file(argv[0], command_1, boost::filesystem::copy_option::overwrite_if_exists);
command_1 += " 1";
if (std::system(command_1.string().c_str())) {
std::exit(1);
const int ret = std::system(command_1.string().c_str());
if (ret) {
std::exit(ret);
}
}
@@ -70,8 +71,9 @@ int main(int argc, const char* argv[]) {
command_2 = command_2.parent_path() / (command_2.stem().string() + "_2" + command_2.extension().string());
boost::filesystem::copy_file(argv[0], command_2, boost::filesystem::copy_option::overwrite_if_exists);
command_2 += " 2";
if (std::system(command_2.string().c_str())) {
std::exit(2);
const int ret = std::system(command_2.string().c_str());
if (ret) {
std::exit(ret);
}
}