Merge "Run bsdiff tests in presubmit." am: 69e0da7fdb am: 7ecc00a844
Change-Id: Iee206fd48cd1a82a38d5050cfa9680b2ecb9e894
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..598f4c9
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+ "presubmit": [
+ {
+ "name": "bsdiff_unittest"
+ }
+ ]
+}
diff --git a/test_utils.cc b/test_utils.cc
index eb079d5..c1350eb 100644
--- a/test_utils.cc
+++ b/test_utils.cc
@@ -53,11 +53,8 @@
void BsdiffTestEnvironment::SetUp() {
#ifdef BSDIFF_TARGET_UNITTEST
-#define BSDIFF_TARGET_TMP_BASE "/data/tmp"
- if (access(BSDIFF_TARGET_TMP_BASE, F_OK) == -1) {
- mkdir(BSDIFF_TARGET_TMP_BASE, S_IRWXU | S_IRWXG | S_IROTH | S_IWOTH);
- }
- setenv("TMPDIR", BSDIFF_TARGET_TMP_BASE, 1);
+#define BSDIFF_TARGET_TMP_BASE "/data/local/tmp"
+ setenv("TMPDIR", BSDIFF_TARGET_TMP_BASE, 1);
#endif // defined (BSDIFF_TARGET_UNITTEST)
}