Create temporary files in the system's temp directory.
In Brillo, the temporary directory might not be /tmp. This patch uses
base::GetTempDir() instead and removes the hard-coded mentions of /tmp
when creating temporary directories.
Bug: 22024447
Test: `update_engine_client --update --omaha_url=...` mounts /system on the temp directory under /data/local/tmp
Change-Id: Ibb52cae01419511f91bdfbf6f228b74a581edde9
diff --git a/test_utils.h b/test_utils.h
index 7a77299..6108b6f 100644
--- a/test_utils.h
+++ b/test_utils.h
@@ -162,7 +162,7 @@
class ScopedTempFile {
public:
ScopedTempFile() {
- EXPECT_TRUE(utils::MakeTempFile("/tmp/update_engine_test_temp_file.XXXXXX",
+ EXPECT_TRUE(utils::MakeTempFile("update_engine_test_temp_file.XXXXXX",
&path_,
nullptr));
unlinker_.reset(new ScopedPathUnlinker(path_));