aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/compiler_wrapper_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/compiler_wrapper_test.go')
-rw-r--r--compiler_wrapper/compiler_wrapper_test.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/compiler_wrapper/compiler_wrapper_test.go b/compiler_wrapper/compiler_wrapper_test.go
index 0a041fe8..5e347ec1 100644
--- a/compiler_wrapper/compiler_wrapper_test.go
+++ b/compiler_wrapper/compiler_wrapper_test.go
@@ -128,7 +128,7 @@ func TestErrorOnLogRusageAndForceDisableWError(t *testing.T) {
withTestContext(t, func(ctx *testContext) {
ctx.env = []string{
"FORCE_DISABLE_WERROR=1",
- "GETRUSAGE=" + filepath.Join(ctx.tempDir, "rusage.log"),
+ "GETRUSAGE=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 {
@@ -137,6 +137,32 @@ func TestErrorOnLogRusageAndForceDisableWError(t *testing.T) {
})
}
+func TestErrorOnLogRusageAndBisect(t *testing.T) {
+ withTestContext(t, func(ctx *testContext) {
+ ctx.env = []string{
+ "BISECT_STAGE=xyz",
+ "GETRUSAGE=rusage.log",
+ }
+ stderr := ctx.mustFail(callCompiler(ctx, ctx.cfg, ctx.newCommand(gccX86_64, mainCc)))
+ if err := verifyNonInternalError(stderr, "BISECT_STAGE is meaningless with GETRUSAGE"); err != nil {
+ t.Error(err)
+ }
+ })
+}
+
+func TestErrorOnBisectAndForceDisableWError(t *testing.T) {
+ withTestContext(t, func(ctx *testContext) {
+ ctx.env = []string{
+ "BISECT_STAGE=xyz",
+ "FORCE_DISABLE_WERROR=1",
+ }
+ stderr := ctx.mustFail(callCompiler(ctx, ctx.cfg, ctx.newCommand(gccX86_64, mainCc)))
+ if err := verifyNonInternalError(stderr, "BISECT_STAGE is meaningless with FORCE_DISABLE_WERROR"); err != nil {
+ t.Error(err)
+ }
+ })
+}
+
func TestPrintUserCompilerError(t *testing.T) {
buffer := bytes.Buffer{}
printCompilerError(&buffer, newUserErrorf("abcd"))