summaryrefslogtreecommitdiffstats
path: root/tests/component/verifier_test.cpp
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/component/verifier_test.cpp
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/component/verifier_test.cpp')
-rw-r--r--tests/component/verifier_test.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/component/verifier_test.cpp b/tests/component/verifier_test.cpp
index 7f9a71408..60a78f5c3 100644
--- a/tests/component/verifier_test.cpp
+++ b/tests/component/verifier_test.cpp
@@ -37,9 +37,6 @@
#include "ui.h"
#include "verifier.h"
-static const char* DATA_PATH = getenv("ANDROID_DATA");
-static const char* TESTDATA_PATH = "/recovery/testdata/";
-
RecoveryUI* ui = NULL;
class MockUI : public RecoveryUI {
@@ -92,17 +89,13 @@ class VerifierTest : public testing::TestWithParam<std::vector<std::string>> {
virtual void SetUp() {
std::vector<std::string> args = GetParam();
- std::string package =
- android::base::StringPrintf("%s%s%s%s", DATA_PATH, NATIVE_TEST_PATH,
- TESTDATA_PATH, args[0].c_str());
+ std::string package = from_testdata_base(args[0]);
if (sysMapFile(package.c_str(), &memmap) != 0) {
FAIL() << "Failed to mmap " << package << ": " << strerror(errno) << "\n";
}
for (auto it = ++(args.cbegin()); it != args.cend(); ++it) {
- std::string public_key_file = android::base::StringPrintf(
- "%s%s%stestkey_%s.txt", DATA_PATH, NATIVE_TEST_PATH,
- TESTDATA_PATH, it->c_str());
+ std::string public_key_file = from_testdata_base("testkey_" + *it + ".txt");
ASSERT_TRUE(load_keys(public_key_file.c_str(), certs));
}
}