aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/testutil_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_wrapper/testutil_test.go')
-rw-r--r--compiler_wrapper/testutil_test.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler_wrapper/testutil_test.go b/compiler_wrapper/testutil_test.go
index 463e34ac..6c5f1da8 100644
--- a/compiler_wrapper/testutil_test.go
+++ b/compiler_wrapper/testutil_test.go
@@ -39,7 +39,6 @@ type testContext struct {
tempDir string
env []string
cfg *config
- inputCmd *command
lastCmd *command
cmdCount int
cmdMock func(cmd *command, stdin io.Reader, stdout io.Writer, stderr io.Writer) error
@@ -85,6 +84,12 @@ func (ctx *testContext) umask(mask int) (oldmask int) {
return syscall.Umask(mask)
}
+func (ctx *testContext) setArbitraryClangArtifactsDir() string {
+ d := filepath.Join(ctx.tempDir, "cros-artifacts")
+ ctx.env = append(ctx.env, crosArtifactsEnvVar+"="+d)
+ return d
+}
+
func (ctx *testContext) initUmaskDependency(lockFn func(), unlockFn func()) {
if ctx.umaskRestoreAction != nil {
// Use a panic so we get a backtrace.
@@ -191,9 +196,6 @@ func (ctx *testContext) mustFail(exitCode int) string {
func (ctx *testContext) updateConfig(cfg *config) {
*ctx.cfg = *cfg
- ctx.cfg.newWarningsDir = filepath.Join(ctx.tempDir, "fatal_clang_warnings")
- ctx.cfg.triciumNitsDir = filepath.Join(ctx.tempDir, "tricium_nits")
- ctx.cfg.crashArtifactsDir = filepath.Join(ctx.tempDir, "clang_crash_diagnostics")
}
func (ctx *testContext) newCommand(path string, args ...string) *command {