summaryrefslogtreecommitdiffstats
path: root/tests/common
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-11-03 00:17:17 +0100
committerTao Bao <tbao@google.com>2016-11-03 07:18:01 +0100
commit4102b281324eca22cd4ef0922a79949ec6cf846e (patch)
treedf496b1d676e1c2e265abbc5777ecba1eb3afddd /tests/common
parentMerge "applypatch: Add testcases for applypatch executable." (diff)
downloadandroid_bootable_recovery-4102b281324eca22cd4ef0922a79949ec6cf846e.tar
android_bootable_recovery-4102b281324eca22cd4ef0922a79949ec6cf846e.tar.gz
android_bootable_recovery-4102b281324eca22cd4ef0922a79949ec6cf846e.tar.bz2
android_bootable_recovery-4102b281324eca22cd4ef0922a79949ec6cf846e.tar.lz
android_bootable_recovery-4102b281324eca22cd4ef0922a79949ec6cf846e.tar.xz
android_bootable_recovery-4102b281324eca22cd4ef0922a79949ec6cf846e.tar.zst
android_bootable_recovery-4102b281324eca22cd4ef0922a79949ec6cf846e.zip
Diffstat (limited to 'tests/common')
-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