- fix build of test-path (after recent bufferiszero move) - remove the direct .c includes - add the test from tcg/ to the tests check-unit list.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- tests/{tcg/test_path.c => test-path.c} | 12 ++---------- tests/Makefile.include | 3 +++ tests/tcg/Makefile | 9 +-------- 3 files changed, 6 insertions(+), 18 deletions(-) rename tests/{tcg/test_path.c => test-path.c} (94%) diff --git a/tests/tcg/test_path.c b/tests/test-path.c similarity index 94% rename from tests/tcg/test_path.c rename to tests/test-path.c index 1c29bce..f2f4ab1 100644 --- a/tests/tcg/test_path.c +++ b/tests/test-path.c @@ -1,13 +1,5 @@ -/* Test path override code */ -#include "config-host.h" -#include "util/cutils.c" -#include "util/hexdump.c" -#include "util/iov.c" -#include "util/path.c" -#include "util/qemu-timer-common.c" -#include <stdarg.h> -#include <sys/stat.h> -#include <fcntl.h> +#include "qemu/osdep.h" +#include "qemu/path.h" void qemu_log(const char *fmt, ...); diff --git a/tests/Makefile.include b/tests/Makefile.include index 2f11064..7907621 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -115,6 +115,8 @@ check-unit-y += tests/test-logging$(EXESUF) check-unit-$(CONFIG_REPLICATION) += tests/test-replication$(EXESUF) check-unit-y += tests/test-bufferiszero$(EXESUF) gcov-files-check-bufferiszero-y = util/bufferiszero.c +check-unit-y += tests/test-path$(EXESUF) +gcov-files-check-path-y = util/path.c check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh @@ -488,6 +490,7 @@ tests/test-qht$(EXESUF): tests/test-qht.o $(test-util-obj-y) tests/test-qht-par$(EXESUF): tests/test-qht-par.o tests/qht-bench$(EXESUF) $(test-util-obj-y) tests/qht-bench$(EXESUF): tests/qht-bench.o $(test-util-obj-y) tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y) +tests/test-path$(EXESUF): tests/test-path.o $(test-util-obj-y) tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \ hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\ diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 89e3342..7409a24 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -31,7 +31,7 @@ ifneq ($(ARCH),i386) I386_TESTS+=run-test-x86_64 endif -TESTS = test_path +TESTS = ifneq ($(call find-in-path, $(CC_I386)),) TESTS += $(I386_TESTS) endif @@ -75,15 +75,8 @@ run-test-mmap: test-mmap run-runcom: runcom -$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com -run-test_path: test_path - ./test_path - # rules to compile tests -test_path: test_path.o - -test_path.o: test_path.c - hello-i386: hello-i386.c $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< strip $@ -- 2.10.0