blob: 77b070d5f5f389cca8d45e6f120a0ffaaf4ef3c8 [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
2# Copyright (c) 2018, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Sandrine Bailleuxd78c03d2018-09-25 15:44:39 +02007TESTS ?= common
8
9TESTS_FILE := tftf/tests/tests-${TESTS}.xml
10TESTS_MAKEFILE := tftf/tests/tests-${TESTS}.mk
11
12# Check that the selected tests file and makefile exist.
13ifeq (,$(wildcard ${TESTS_FILE}))
14 $(error "Tests file tftf/tests/tests-${TESTS}.xml does not exist.")
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020015endif
16
Sandrine Bailleuxd78c03d2018-09-25 15:44:39 +020017ifeq (,$(wildcard ${TESTS_MAKEFILE}))
18 $(error "Tests makefile tftf/tests/tests-${TESTS}.mk does not exist.")
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020019endif
20
Sandrine Bailleuxfe6ff412018-10-16 10:20:38 +020021# Initialize variable before including all sub-makefiles that will append source
22# files to it.
23TESTS_SOURCES :=
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020024
Sandrine Bailleuxd78c03d2018-09-25 15:44:39 +020025include ${TESTS_MAKEFILE}
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020026
Sandrine Bailleuxfe6ff412018-10-16 10:20:38 +020027# Some source files might be included by several test makefiles.
28# Remove duplicate ones.
29TESTS_SOURCES := $(sort ${TESTS_SOURCES})