blob: 2815b4a1cf4b9f10c5c2b4dfef03c791d5f3c676 [file] [log] [blame]
Kiyoung Kim84cbf002019-08-21 19:46:51 +09001/*
2 * Copyright (C) 2019 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 agreed 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 */
16#pragma once
17
18#include "linkerconfig/variables.h"
19
20inline void MockGenericVariables() {
21 android::linkerconfig::modules::Variables::AddValue("VNDK_VER", "99");
22 android::linkerconfig::modules::Variables::AddValue("PRODUCT", "product");
23 android::linkerconfig::modules::Variables::AddValue("SYSTEM_EXT",
24 "system_ext");
25 android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES",
26 "llndk_libraries");
27 android::linkerconfig::modules::Variables::AddValue(
28 "SANITIZER_RUNTIME_LIBRARIES", "sanitizer_runtime_libraries");
29 android::linkerconfig::modules::Variables::AddValue(
30 "PRIVATE_LLNDK_LIBRARIES", "private_llndk_libraries");
31 android::linkerconfig::modules::Variables::AddValue(
32 "VNDK_SAMEPROCESS_LIBRARIES", "vndk_sameprocess_libraries");
33 android::linkerconfig::modules::Variables::AddValue("VNDK_CORE_LIBRARIES",
34 "vndk_core_libraries");
35 android::linkerconfig::modules::Variables::AddValue(
Kiyoung Kime6558072019-09-30 16:58:39 +090036 "VNDK_USING_CORE_VARIANT_LIBRARIES", "");
Kiyoung Kim84cbf002019-08-21 19:46:51 +090037}
38
39inline void MockVndkVersion(std::string vndk_version) {
40 android::linkerconfig::modules::Variables::AddValue("VNDK_VER", vndk_version);
Kiyoung Kime6558072019-09-30 16:58:39 +090041}
42
43inline void MockVndkUsingCoreVariant() {
44 android::linkerconfig::modules::Variables::AddValue(
45 "VNDK_USING_CORE_VARIANT_LIBRARIES", "vndk_using_core_variant_libraries");
46}
47
48inline void MockVnkdLite() {
49 android::linkerconfig::modules::Variables::AddValue("ro.vndk.lite", "true");
Kiyoung Kim84cbf002019-08-21 19:46:51 +090050}