Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2018, Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Sandrine Bailleux | d78c03d | 2018-09-25 15:44:39 +0200 | [diff] [blame^] | 7 | TESTS ?= common |
| 8 | |
| 9 | TESTS_FILE := tftf/tests/tests-${TESTS}.xml |
| 10 | TESTS_MAKEFILE := tftf/tests/tests-${TESTS}.mk |
| 11 | |
| 12 | # Check that the selected tests file and makefile exist. |
| 13 | ifeq (,$(wildcard ${TESTS_FILE})) |
| 14 | $(error "Tests file tftf/tests/tests-${TESTS}.xml does not exist.") |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 15 | endif |
| 16 | |
Sandrine Bailleux | d78c03d | 2018-09-25 15:44:39 +0200 | [diff] [blame^] | 17 | ifeq (,$(wildcard ${TESTS_MAKEFILE})) |
| 18 | $(error "Tests makefile tftf/tests/tests-${TESTS}.mk does not exist.") |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 19 | endif |
| 20 | |
Sandrine Bailleux | fe6ff41 | 2018-10-16 10:20:38 +0200 | [diff] [blame] | 21 | # Initialize variable before including all sub-makefiles that will append source |
| 22 | # files to it. |
| 23 | TESTS_SOURCES := |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 24 | |
Sandrine Bailleux | d78c03d | 2018-09-25 15:44:39 +0200 | [diff] [blame^] | 25 | include ${TESTS_MAKEFILE} |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 26 | |
Sandrine Bailleux | fe6ff41 | 2018-10-16 10:20:38 +0200 | [diff] [blame] | 27 | # Some source files might be included by several test makefiles. |
| 28 | # Remove duplicate ones. |
| 29 | TESTS_SOURCES := $(sort ${TESTS_SOURCES}) |