summaryrefslogtreecommitdiffstats
path: root/tests/common/test_constants.h
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-11-03 19:21:55 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-11-03 19:21:55 +0100
commita98b4e4befceea21104002cceadcf38aac6c90e5 (patch)
tree06972a140387f9e5e4644b473508b9e6e22b4965 /tests/common/test_constants.h
parentMerge "applypatch: Add testcases for applypatch executable." (diff)
parentMerge "tests: Set up testdata path for continuous native tests." (diff)
downloadandroid_bootable_recovery-a98b4e4befceea21104002cceadcf38aac6c90e5.tar
android_bootable_recovery-a98b4e4befceea21104002cceadcf38aac6c90e5.tar.gz
android_bootable_recovery-a98b4e4befceea21104002cceadcf38aac6c90e5.tar.bz2
android_bootable_recovery-a98b4e4befceea21104002cceadcf38aac6c90e5.tar.lz
android_bootable_recovery-a98b4e4befceea21104002cceadcf38aac6c90e5.tar.xz
android_bootable_recovery-a98b4e4befceea21104002cceadcf38aac6c90e5.tar.zst
android_bootable_recovery-a98b4e4befceea21104002cceadcf38aac6c90e5.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