aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/disable_werror_flag_test.go
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2020-04-01 12:21:42 -0700
committerGeorge Burgess <gbiv@chromium.org>2020-04-01 20:41:55 +0000
commitca8e8b8dc0f702eaa3c74f9b5468547623423a41 (patch)
tree7969978a4c1f06468ddb7dc2ac9ec823eea3124d /compiler_wrapper/disable_werror_flag_test.go
parentbfb695533f6c8f4f1b26609d233c858e2c135931 (diff)
downloadtoolchain-utils-ca8e8b8dc0f702eaa3c74f9b5468547623423a41.tar.gz
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 <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
Diffstat (limited to 'compiler_wrapper/disable_werror_flag_test.go')
-rw-r--r--compiler_wrapper/disable_werror_flag_test.go6
1 files changed, 3 insertions, 3 deletions
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")
}
})
}