diff options
author | Tao Bao <tbao@google.com> | 2016-11-03 19:15:07 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-11-03 19:15:07 +0100 |
commit | 4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4 (patch) | |
tree | df496b1d676e1c2e265abbc5777ecba1eb3afddd /tests/common/test_constants.h | |
parent | Merge "applypatch: Add testcases for applypatch executable." (diff) | |
parent | tests: Set up testdata path for continuous native tests. (diff) | |
download | android_bootable_recovery-4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4.tar android_bootable_recovery-4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4.tar.gz android_bootable_recovery-4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4.tar.bz2 android_bootable_recovery-4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4.tar.lz android_bootable_recovery-4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4.tar.xz android_bootable_recovery-4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4.tar.zst android_bootable_recovery-4011bb161a60fb04fb0d4c4c3e1090d43fcdd9e4.zip |
Diffstat (limited to 'tests/common/test_constants.h')
-rw-r--r-- | tests/common/test_constants.h | 15 |
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 |