Merge "Run bsdiff tests in presubmit." am: 69e0da7fdb am: 7ecc00a844 am: 64f9faac54 am: e3f693a705

Change-Id: Iccdad42f82abe094473f99818a8581911074757f
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)
 }