# -*- Mode: makefile -*-
#
# TCG tests
#
# These are complicated by the fact we want to build them for guest
# systems. This requires knowing what guests we are building and which
# ones we have cross-compilers for or docker images with
# cross-compilers.
#
# The tests themselves should be as minimal as possible as
# cross-compilers don't always have a large amount of libraries
# available.
#
# We only include the host build system for SRC_PATH and we don't
# bother with the common rules.mk. We expect the following:
#
#   CC - the C compiler command
#   EXTRA_CFLAGS - any extra CFLAGS
#   BUILD_STATIC - are we building static binaries
#
# By default all tests are statically compiled but some host systems
# may not package static libraries by default. If an external
# cross-compiler can only build dynamic libraries the user might need
# to make extra efforts to ensure ld.so can link at runtime when the
# tests are run.
#
# We also accept SPEED=slow to enable slower running tests
#
# We also expect to be in the tests build dir for the FOO-(linux-user|softmmu).
#

all:
-include ../config-host.mak
-include config-target.mak

# Get semihosting definitions for user-mode emulation
ifeq ($(filter %-softmmu, $(TARGET)),)
-include $(SRC_PATH)/configs/targets/$(TARGET).mak
endif

# for including , in command strings
COMMA := ,
NULL :=
SPACE := $(NULL) #
TARGET_PREFIX=tests/tcg/$(TARGET):$(SPACE)

quiet-@ = $(if $(V),,@$(if $1,printf "  %-7s %s\n" "$(strip $1)" "$(strip $2)" && ))
quiet-command = $(call quiet-@,$2,$3)$1

cc-test = $(CC) -Werror $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1
cc-option = if $(call cc-test, $1); then \
    echo "$(TARGET_PREFIX)$1 detected" && echo "$(strip $2)=y" >&3; else \
    echo "$(TARGET_PREFIX)$1 not detected"; fi

# $1 = test name, $2 = cmd, $3 = desc
ifeq ($(filter %-softmmu, $(TARGET)),)
run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2 > $1.out, \
	TEST,$(or $3, $*, $<) on $(TARGET_NAME))
else
run-test = $(call quiet-command, timeout -s KILL --foreground $(TIMEOUT) $2, \
        TEST,$(or $3, $*, $<) on $(TARGET_NAME))
endif

# $1 = test name, $2 = reference
# to work around the pipe squashing the status we only pipe the result if
# we know it failed and then force failure at the end.
diff-out = $(call quiet-command, diff -q $1.out $2 || \
                                 (diff -u $1.out $2 | head -n 10 && false), \
                                 DIFF,$1.out with $2)

# $1 = test name, $2 = reason
skip-test = @printf "  SKIPPED %s on $(TARGET_NAME) because %s\n" $1 $2

# $1 = test name, $2 = reference
# As above but only diff if reference file exists, otherwise the test
# passes if it managed to complete with a status of zero
conditional-diff-out = 							\
	$(if $(wildcard $2), 						\
		$(call diff-out,$1,$2), 				\
		$(call skip-test,"$1 check","no reference"))


# Tests we are building
TESTS=
# additional tests which may re-use existing binaries
EXTRA_TESTS=

# Start with a blank slate, the build targets get to add stuff first
CFLAGS=
LDFLAGS=

QEMU_OPTS=


# If TCG debugging, or TCI is enabled things are a lot slower
# ??? Makefile no longer has any indication that TCI is enabled,
# but for the record:
#   15s    original default
#   60s    with --enable-debug
#   90s    with --enable-tcg-interpreter
TIMEOUT=90

ifeq ($(filter %-softmmu, $(TARGET)),)
# The order we include is important. We include multiarch first and
# then the target. If there are common tests shared between
# sub-targets (e.g. ARM & AArch64) then it is up to
# $(TARGET_NAME)/Makefile.target to include the common parent
# architecture in its VPATH.
-include $(SRC_PATH)/tests/tcg/multiarch/Makefile.target
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.target

# Add the common build options
CFLAGS+=-Wall -Werror -O0 -g -fno-strict-aliasing
ifeq ($(BUILD_STATIC),y)
LDFLAGS+=-static
endif

%: %.c
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
%: %.S
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
else
# For softmmu targets we include a different Makefile fragement as the
# build options for bare programs are usually pretty different. They
# are expected to provide their own build recipes.
EXTRA_CFLAGS += -ffreestanding
-include $(SRC_PATH)/tests/tcg/minilib/Makefile.target
-include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target

endif

all: $(TESTS) $(EXTRA_TESTS)

#
# Test Runners
#
# By default we just run the test with the appropriate QEMU for the
# target. More advanced tests may want to override the runner in their
# specific make rules. Additional runners for the same binary should
# be added to EXTRA_RUNS.
#

RUN_TESTS=$(patsubst %,run-%, $(TESTS))

# If plugins exist also include those in the tests
ifeq ($(CONFIG_PLUGIN),y)
PLUGIN_SRC=$(SRC_PATH)/tests/plugin
PLUGIN_LIB=../../plugin
VPATH+=$(PLUGIN_LIB)
PLUGINS=$(patsubst %.c, lib%.so, $(notdir $(wildcard $(PLUGIN_SRC)/*.c)))

# We need to ensure expand the run-plugin-TEST-with-PLUGIN
# pre-requistes manually here as we can't use stems to handle it. We
# only expand MULTIARCH_TESTS which are common on most of our targets
# to avoid an exponential explosion as new tests are added. We also
# add some special helpers the run-plugin- rules can use bellow.

ifneq ($(MULTIARCH_TESTS),)
$(foreach p,$(PLUGINS), \
	$(foreach t,$(MULTIARCH_TESTS),\
		$(eval run-plugin-$(t)-with-$(p): $t $p) \
		$(eval RUN_TESTS+=run-plugin-$(t)-with-$(p))))
endif # MULTIARCH_TESTS
endif # CONFIG_PLUGIN

strip-plugin = $(wordlist 1, 1, $(subst -with-, ,$1))
extract-plugin = $(wordlist 2, 2, $(subst -with-, ,$1))

RUN_TESTS+=$(EXTRA_RUNS)

ifeq ($(filter %-softmmu, $(TARGET)),)
run-%: %
	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<)

run-plugin-%:
	$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
		-plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
		-d plugin -D $*.pout \
		 $(call strip-plugin,$<))
else
run-%: %
	$(call run-test, $<, \
	  $(QEMU) -monitor none -display none \
		  -chardev file$(COMMA)path=$<.out$(COMMA)id=output \
		  $(QEMU_OPTS) $<)

run-plugin-%:
	$(call run-test, $@, \
	  $(QEMU) -monitor none -display none \
		  -chardev file$(COMMA)path=$@.out$(COMMA)id=output \
	   	  -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
	    	  -d plugin -D $*.pout \
		  $(QEMU_OPTS) $(call strip-plugin,$<))
endif

gdb-%: %
	gdb --args $(QEMU) $(QEMU_OPTS) $<

.PHONY: run
run: $(RUN_TESTS)

clean:
	rm -f $(TESTS) *.o $(CLEANFILES)

distclean:
	rm -f config-cc.mak config-target.mak ../config-$(TARGET).mak

.PHONY: help
help:
	@echo "TCG tests help $(TARGET_NAME)"
	@echo "Built with $(CC)"
	@echo "Available tests:"
	@$(foreach t,$(RUN_TESTS),echo "  $t";)
