1# Copyright (C) 2020 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15 16LOCAL_DIR := $(GET_LOCAL_DIR) 17 18MODULE := $(LOCAL_DIR) 19 20MANIFEST := $(LOCAL_DIR)/manifest.json 21 22MODULE_SRCS += \ 23 $(LOCAL_DIR)/apploader_test.c \ 24 $(LOCAL_DIR)/test_apps.S \ 25 26MODULE_LIBRARY_DEPS += \ 27 trusty/user/base/lib/libc-trusty \ 28 trusty/user/base/lib/system_state \ 29 trusty/user/base/lib/tipc \ 30 trusty/user/base/lib/unittest \ 31 trusty/user/base/interface/apploader \ 32 33APPLOADER_TESTS_DIR := \ 34 $(TRUSTY_APP_BUILDDIR)/trusty/user/base/app/apploader/tests 35 36VERSION_TEST_APP_V1 := \ 37 $(APPLOADER_TESTS_DIR)/version_test_apps/v1/v1.app 38VERSION_TEST_APP_V2 := \ 39 $(APPLOADER_TESTS_DIR)/version_test_apps/v2/v2.app 40VERSION_TEST_APP_V3 := \ 41 $(APPLOADER_TESTS_DIR)/version_test_apps/v3/v3.app 42 43MMIO_TEST_APP_ALLOWED := \ 44 $(APPLOADER_TESTS_DIR)/mmio_test_apps/allowed/allowed.app 45MMIO_TEST_APP_BAD_UUID := \ 46 $(APPLOADER_TESTS_DIR)/mmio_test_apps/bad_uuid/bad_uuid.app 47MMIO_TEST_APP_BAD_RANGE_LOW := \ 48 $(APPLOADER_TESTS_DIR)/mmio_test_apps/bad_range_low/bad_range_low.app 49MMIO_TEST_APP_BAD_RANGE_HIGH := \ 50 $(APPLOADER_TESTS_DIR)/mmio_test_apps/bad_range_high/bad_range_high.app 51 52ENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_OPTIONAL := \ 53 $(APPLOADER_TESTS_DIR)/encryption_test_apps/encrypted_app/encryption_optional/encryption_optional.app 54ENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_REQUIRED := \ 55 $(APPLOADER_TESTS_DIR)/encryption_test_apps/encrypted_app/encryption_required/encryption_required.app 56ENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_OPTIONAL := \ 57 $(APPLOADER_TESTS_DIR)/encryption_test_apps/unencrypted_app/encryption_optional/encryption_optional.app 58ENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_REQUIRED := \ 59 $(APPLOADER_TESTS_DIR)/encryption_test_apps/unencrypted_app/encryption_required/encryption_required.app 60 61MODULE_ASMFLAGS += \ 62 -DVERSION_TEST_APP_V1=\"$(VERSION_TEST_APP_V1)\" \ 63 -DVERSION_TEST_APP_V2=\"$(VERSION_TEST_APP_V2)\" \ 64 -DVERSION_TEST_APP_V3=\"$(VERSION_TEST_APP_V3)\" \ 65 -DMMIO_TEST_APP_ALLOWED=\"$(MMIO_TEST_APP_ALLOWED)\" \ 66 -DMMIO_TEST_APP_BAD_UUID=\"$(MMIO_TEST_APP_BAD_UUID)\" \ 67 -DMMIO_TEST_APP_BAD_RANGE_LOW=\"$(MMIO_TEST_APP_BAD_RANGE_LOW)\" \ 68 -DMMIO_TEST_APP_BAD_RANGE_HIGH=\"$(MMIO_TEST_APP_BAD_RANGE_HIGH)\" \ 69 -DENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_OPTIONAL=\"$(ENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_OPTIONAL)\" \ 70 -DENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_REQUIRED=\"$(ENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_REQUIRED)\" \ 71 -DENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_OPTIONAL=\"$(ENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_OPTIONAL)\" \ 72 -DENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_REQUIRED=\"$(ENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_REQUIRED)\" \ 73 74MODULE_SRCDEPS += \ 75 $(VERSION_TEST_APP_V1) \ 76 $(VERSION_TEST_APP_V2) \ 77 $(VERSION_TEST_APP_V3) \ 78 $(MMIO_TEST_APP_ALLOWED) \ 79 $(MMIO_TEST_APP_BAD_UUID) \ 80 $(MMIO_TEST_APP_BAD_RANGE_LOW) \ 81 $(MMIO_TEST_APP_BAD_RANGE_HIGH) \ 82 $(ENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_OPTIONAL) \ 83 $(ENCRYPTION_TEST_APP_ENCRYPTED_APP_ENCRYPTION_REQUIRED) \ 84 $(ENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_OPTIONAL) \ 85 $(ENCRYPTION_TEST_APP_UNENCRYPTED_APP_ENCRYPTION_REQUIRED) \ 86 87include make/trusted_app.mk 88