diff options
Diffstat (limited to 'compiler_wrapper/compiler_wrapper_test.go')
-rw-r--r-- | compiler_wrapper/compiler_wrapper_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler_wrapper/compiler_wrapper_test.go b/compiler_wrapper/compiler_wrapper_test.go index 5abf7ce9..0a041fe8 100644 --- a/compiler_wrapper/compiler_wrapper_test.go +++ b/compiler_wrapper/compiler_wrapper_test.go @@ -124,6 +124,19 @@ func TestLogExitCodeErrorWhenComparingToOldWrapper(t *testing.T) { }) } +func TestErrorOnLogRusageAndForceDisableWError(t *testing.T) { + withTestContext(t, func(ctx *testContext) { + ctx.env = []string{ + "FORCE_DISABLE_WERROR=1", + "GETRUSAGE=" + filepath.Join(ctx.tempDir, "rusage.log"), + } + stderr := ctx.mustFail(callCompiler(ctx, ctx.cfg, ctx.newCommand(gccX86_64, mainCc))) + if err := verifyNonInternalError(stderr, "GETRUSAGE is meaningless with FORCE_DISABLE_WERROR"); err != nil { + t.Error(err) + } + }) +} + func TestPrintUserCompilerError(t *testing.T) { buffer := bytes.Buffer{} printCompilerError(&buffer, newUserErrorf("abcd")) |