summaryrefslogtreecommitdiffstats
path: root/tests/common/test_constants.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-11-03 19:31:25 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-11-03 19:31:25 +0100
commit5d9f36e3b34af98141748a3b7c900ed17c7775d6 (patch)
treeac787748f226a7bec3462de6b14491601607b464 /tests/common/test_constants.h
parentMerge "applypatch: Add testcases for applypatch executable." am: 5696526ba4 am: 4fc42365ac am: 24356d778f (diff)
parentMerge "tests: Set up testdata path for continuous native tests." am: 4011bb161a am: a98b4e4bef (diff)
downloadandroid_bootable_recovery-5d9f36e3b34af98141748a3b7c900ed17c7775d6.tar
android_bootable_recovery-5d9f36e3b34af98141748a3b7c900ed17c7775d6.tar.gz
android_bootable_recovery-5d9f36e3b34af98141748a3b7c900ed17c7775d6.tar.bz2
android_bootable_recovery-5d9f36e3b34af98141748a3b7c900ed17c7775d6.tar.lz
android_bootable_recovery-5d9f36e3b34af98141748a3b7c900ed17c7775d6.tar.xz
android_bootable_recovery-5d9f36e3b34af98141748a3b7c900ed17c7775d6.tar.zst
android_bootable_recovery-5d9f36e3b34af98141748a3b7c900ed17c7775d6.zip
Diffstat (limited to 'tests/common/test_constants.h')
-rw-r--r--tests/common/test_constants.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/common/test_constants.h b/tests/common/test_constants.h
index 3490f6805..97e74a3c2 100644
--- a/tests/common/test_constants.h
+++ b/tests/common/test_constants.h
@@ -13,13 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
#ifndef _OTA_TEST_CONSTANTS_H
#define _OTA_TEST_CONSTANTS_H
-#if defined(__LP64__)
-#define NATIVE_TEST_PATH "/nativetest64"
-#else
-#define NATIVE_TEST_PATH "/nativetest"
-#endif
+#include <stdlib.h>
+
+static const char* data_root = getenv("ANDROID_DATA");
+
+static std::string from_testdata_base(const std::string& fname) {
+ return std::string(data_root) + "/nativetest/recovery/testdata/" + fname;
+}
-#endif
+#endif // _OTA_TEST_CONSTANTS_H