From ca8e8b8dc0f702eaa3c74f9b5468547623423a41 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Wed, 1 Apr 2020 12:21:42 -0700 Subject: compiler_wrapper: don't write -Werror files on still-failed builds Not `return`ing here was troublesome for our monitoring infra, since it meant that _any_ clang error that mentioned '-Werror', with this support turned on, would turn into a json file. With configure steps and the like, this probably isn't the behavior that we want. BUG=None TEST=unittests Change-Id: I0669c5bd9473b687c34c23f284433a21e8a1d88c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2132233 Commit-Queue: George Burgess Reviewed-by: Manoj Gupta Tested-by: George Burgess --- compiler_wrapper/disable_werror_flag_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler_wrapper/disable_werror_flag_test.go') diff --git a/compiler_wrapper/disable_werror_flag_test.go b/compiler_wrapper/disable_werror_flag_test.go index eb907e6b..bd4d376e 100644 --- a/compiler_wrapper/disable_werror_flag_test.go +++ b/compiler_wrapper/disable_werror_flag_test.go @@ -146,7 +146,7 @@ func TestForwardStdoutAndStderrWhenDoubleBuildFails(t *testing.T) { } } exitCode := callCompiler(ctx, ctx.cfg, ctx.newCommand(clangX86_64, mainCc)) - if exitCode != 5 { + if exitCode != 3 { t.Errorf("unexpected exitcode. Got: %d", exitCode) } if err := verifyNonInternalError(ctx.stderrString(), "-Werror originalerror"); err != nil { @@ -278,8 +278,8 @@ func TestLogWarningsWhenDoubleBuildFails(t *testing.T) { } ctx.mustFail(callCompiler(ctx, ctx.cfg, ctx.newCommand(clangX86_64, mainCc))) loggedWarnings := readLoggedWarnings(ctx) - if loggedWarnings == nil { - t.Fatal("expected logged warnings") + if loggedWarnings != nil { + t.Fatal("expected no warnings to be logged") } }) } -- cgit v1.2.3