summaryrefslogtreecommitdiffstats
path: root/tests/common/test_constants.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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