From 3d4d5e9431425d7719f88343fa2bb84b361ceb91 Mon Sep 17 00:00:00 2001 From: Alex Denisov Date: Wed, 1 Jan 2025 19:27:51 +0100 Subject: [PATCH] Make original run check stricter --- .../reporters/patch-reporter/cxx_minus_to_noop/main.cpp | 2 +- tests/integration/warm-up-run/failed/sample.c | 4 ++-- tests/integration/warm-up-run/timedout/sample.c | 4 ++-- tools/mull-runner/mull-runner.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/reporters/patch-reporter/cxx_minus_to_noop/main.cpp b/tests/integration/reporters/patch-reporter/cxx_minus_to_noop/main.cpp index 21ef24cd1..2be4024ce 100644 --- a/tests/integration/reporters/patch-reporter/cxx_minus_to_noop/main.cpp +++ b/tests/integration/reporters/patch-reporter/cxx_minus_to_noop/main.cpp @@ -2,7 +2,7 @@ int main() { int x = -1; int y = -x; - return y; + return y != 1; // ensuring zero exit } // clang-format off diff --git a/tests/integration/warm-up-run/failed/sample.c b/tests/integration/warm-up-run/failed/sample.c index 70fd21ee1..98e002228 100644 --- a/tests/integration/warm-up-run/failed/sample.c +++ b/tests/integration/warm-up-run/failed/sample.c @@ -11,8 +11,8 @@ int main() { // clang-format off // RUN: cd / && %clang_cc %sysroot %TEST_CXX_FLAGS %pass_mull_ir_frontend %s -o %s.exe // RUN: cd %CURRENT_DIR -// RUN: (unset TERM; %mull_runner -workers=1 %s.exe 2>&1; test $? = 0) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines -// CHECK:[warning] Original test failed +// RUN: (unset TERM; %mull_runner -workers=1 %s.exe 2>&1; test $? = 1) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines +// CHECK:[error] Original test failed // CHECK-NEXT:status: Failed // CHECK-NEXT:stdout: 'failed stdout' // CHECK-NEXT:stderr: 'failed stderr' diff --git a/tests/integration/warm-up-run/timedout/sample.c b/tests/integration/warm-up-run/timedout/sample.c index 81f40b289..e7fbd2b2f 100644 --- a/tests/integration/warm-up-run/timedout/sample.c +++ b/tests/integration/warm-up-run/timedout/sample.c @@ -7,8 +7,8 @@ int main() { // clang-format off // RUN: cd / && %clang_cc %sysroot %pass_mull_ir_frontend %s -o %s.exe // RUN: cd %CURRENT_DIR -// RUN: (unset TERM; %mull_runner -timeout=100 -workers=1 %s.exe 2>&1; test $? = 0) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines -// CHECK:[warning] Original test failed +// RUN: (unset TERM; %mull_runner -timeout=100 -workers=1 %s.exe 2>&1; test $? = 1) | %filecheck %s --dump-input=fail --strict-whitespace --match-full-lines +// CHECK:[error] Original test failed // CHECK-NEXT:status: Timedout // CHECK-NEXT:stdout: '' // CHECK-NEXT:stderr: '' diff --git a/tools/mull-runner/mull-runner.cpp b/tools/mull-runner/mull-runner.cpp index 54e877f60..e80b02263 100644 --- a/tools/mull-runner/mull-runner.cpp +++ b/tools/mull-runner/mull-runner.cpp @@ -195,7 +195,7 @@ int main(int argc, char **argv) { std::nullopt); }); if (warmUpResult.status != mull::ExecutionStatus::Passed) { - diagnostics.warning(warmUpResult.debugDescription()); + diagnostics.error(warmUpResult.debugDescription()); } if (!rawCoverageData.empty()) {