Skip to content

Commit 5d0b9bd

Browse files
feat(test-framework): Add a makefile for the test framework
Signed-off-by: Miguel Silva <[email protected]>
1 parent 9ce44ca commit 5d0b9bd

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

tests/tests.mk

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright (c) Bao Project and Contributors. All rights reserved
3+
4+
bao-tests_dir = $(tests_dir)/bao-tests
5+
bao-nix_dir = $(tests_dir)/bao-nix
6+
recipes_dir = $(tests_dir)/recipes
7+
8+
LOG_LEVEL?=2
9+
ECHO?=tf
10+
11+
irq_flags:=
12+
13+
ifdef GIC_VERSION
14+
irq_flags+=-gicv
15+
irq_flags+=$(GIC_VERSION)
16+
endif
17+
18+
ifdef IRQC
19+
irq_flags+=-irqc
20+
irq_flags+=$(IRQC)
21+
endif
22+
23+
ifdef IPIC
24+
irq_flags+=-ipic
25+
irq_flags+=$(IPIC)
26+
endif
27+
28+
29+
.PHONY: test-framework
30+
framework:
31+
32+
ifndef RECIPE
33+
@echo "Error: RECIPE variable is not defined. Please specify the path to the recipe file."
34+
@exit 1
35+
endif
36+
37+
@echo "Running Bao Tests Framework..."
38+
python3 $(bao-tests_dir)/framework/test_framework.py \
39+
-recipe $(recipes_dir)/$(RECIPE) \
40+
-log_level $(LOG_LEVEL) \
41+
-echo $(ECHO) \
42+
-platform $(PLATFORM) \
43+
$(irq_flags)
44+

0 commit comments

Comments
 (0)