diff options
author | Alex Bennée <alex.bennee@linaro.org> | 2021-09-17 17:23:24 +0100 |
---|---|---|
committer | Alex Bennée <alex.bennee@linaro.org> | 2021-10-12 08:37:05 +0100 |
commit | 5343a837cdb0e10db05310e0da5a89843539b400 (patch) | |
tree | e4f98ab9cd8bf3c7404e10b8551561d18f076c7e /tests/tcg/multiarch | |
parent | 4f0ebed41809531e4e84658b8ac1742c4ba6966a (diff) |
tests/tcg: move some multiarch files and make conditional
We had some messy code to filter out stuff we can't build. Lets junk
that and simplify the logic by pushing some stuff into subdirs. In
particular we move:
float_helpers into libs - not a standalone test
linux-test into linux - so we only build on Linux hosts
This allows for at least some of the tests to be nominally usable
by *BSD user builds.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Warner Losh <imp@bsdimp.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Message-Id: <20210917162332.3511179-4-alex.bennee@linaro.org>
Diffstat (limited to 'tests/tcg/multiarch')
-rw-r--r-- | tests/tcg/multiarch/Makefile.target | 15 | ||||
-rw-r--r-- | tests/tcg/multiarch/libs/float_helpers.c (renamed from tests/tcg/multiarch/float_helpers.c) | 2 | ||||
-rw-r--r-- | tests/tcg/multiarch/linux/linux-test.c (renamed from tests/tcg/multiarch/linux-test.c) | 0 |
3 files changed, 11 insertions, 6 deletions
diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index 3f283eabe6..6ccb592aac 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -8,18 +8,23 @@ MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch # Set search path for all sources -VPATH += $(MULTIARCH_SRC) -MULTIARCH_SRCS =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c)) -MULTIARCH_TESTS =$(filter-out float_helpers, $(MULTIARCH_SRCS:.c=)) +VPATH += $(MULTIARCH_SRC) +MULTIARCH_SRCS = $(notdir $(wildcard $(MULTIARCH_SRC)/*.c)) +ifneq ($(CONFIG_LINUX),) +VPATH += $(MULTIARCH_SRC)/linux +MULTIARCH_SRCS += $(notdir $(wildcard $(MULTIARCH_SRC)/linux/*.c)) +endif +MULTIARCH_TESTS = $(MULTIARCH_SRCS:.c=) +$(info SRCS=${MULTIARCH_SRCS} and ${MULTIARCH_TESTS}) # # The following are any additional rules needed to build things # float_%: LDFLAGS+=-lm -float_%: float_%.c float_helpers.c - $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/float_helpers.c -o $@ $(LDFLAGS) +float_%: float_%.c libs/float_helpers.c + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< $(MULTIARCH_SRC)/libs/float_helpers.c -o $@ $(LDFLAGS) run-float_%: float_% $(call run-test,$<, $(QEMU) $(QEMU_OPTS) $<,"$< on $(TARGET_NAME)") diff --git a/tests/tcg/multiarch/float_helpers.c b/tests/tcg/multiarch/libs/float_helpers.c index bc530e5732..4e68d2b659 100644 --- a/tests/tcg/multiarch/float_helpers.c +++ b/tests/tcg/multiarch/libs/float_helpers.c @@ -22,7 +22,7 @@ #include <float.h> #include <fenv.h> -#include "float_helpers.h" +#include "../float_helpers.h" #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux/linux-test.c index 019d8175ca..019d8175ca 100644 --- a/tests/tcg/multiarch/linux-test.c +++ b/tests/tcg/multiarch/linux/linux-test.c |