# -*- 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
# also add some special helpers the run-plugin- rules can use bellow.

$(foreach p,$(PLUGINS), \
	$(foreach t,$(TESTS),\
		$(eval run-plugin-$(t)-with-$(p): $t $p) \
		$(eval RUN_TESTS+=run-plugin-$(t)-with-$(p))))
endif

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
