tests: move test-path in check-unit-y
PATCH 1/1 tests: move test-path in check-unit-y
- 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 <[email protected]>
---
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%)tests/test-path.c renamed from tests/tcg/test_path.c +2 -10
@@ -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, ...);
tests/Makefile.include +3 -0
@@ -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\
tests/tcg/Makefile +1 -8
@@ -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 $@
Signature · 1 line
2.10.0