blob: f6b6922a425fd37a0c2a65d7deb2f88aea20ca73 [file] [log] [blame]
Jed Estepb8a693b2016-03-09 17:51:34 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agree to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
Tao Bao4102b282016-11-02 16:17:17 -070016
Jed Estepb8a693b2016-03-09 17:51:34 -080017#ifndef _OTA_TEST_CONSTANTS_H
18#define _OTA_TEST_CONSTANTS_H
19
Tao Bao4102b282016-11-02 16:17:17 -070020#include <stdlib.h>
Jed Estepb8a693b2016-03-09 17:51:34 -080021
Tao Baoef0eb3b2016-11-14 21:29:52 -080022// Zip entries in ziptest_valid.zip.
23static const std::string kATxtContents("abcdefghabcdefgh\n");
24static const std::string kBTxtContents("abcdefgh\n");
Tao Bao1036d362016-11-17 22:49:56 -080025static const std::string kCTxtContents("abcdefghabcdefgh\n");
26static const std::string kDTxtContents("abcdefgh\n");
Tao Baoef0eb3b2016-11-14 21:29:52 -080027
28// echo -n -e "abcdefghabcdefgh\n" | sha1sum
29static const std::string kATxtSha1Sum("32c96a03dc8cd20097940f351bca6261ee5a1643");
30// echo -n -e "abcdefgh\n" | sha1sum
31static const std::string kBTxtSha1Sum("e414af7161c9554089f4106d6f1797ef14a73666");
32
Tao Bao4102b282016-11-02 16:17:17 -070033static const char* data_root = getenv("ANDROID_DATA");
34
35static std::string from_testdata_base(const std::string& fname) {
36 return std::string(data_root) + "/nativetest/recovery/testdata/" + fname;
37}
38
39#endif // _OTA_TEST_CONSTANTS_H