aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/testutil_test.go
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-10 15:44:15 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-10 15:44:15 +0000
commit73c65f36e5f929469a7e1d1c3614c0c0de5bf3e4 (patch)
tree73cf539fbd5869fe4d7cbbe4f6617b0078b5fd78 /compiler_wrapper/testutil_test.go
parent9870dd4e6d12bb96b4e78ca9fc6e8e5dbfa71d83 (diff)
parentb2a70cac1c74a5f894d676e7a41e4877b4e9db00 (diff)
downloadtoolchain-utils-73c65f36e5f929469a7e1d1c3614c0c0de5bf3e4.tar.gz
Snap for 11819167 from b2a70cac1c74a5f894d676e7a41e4877b4e9db00 to busytown-mac-infra-release
Change-Id: If2606170bee6f03f014502da2205ad58061c51a5
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 {