Skip to contentSkip to conversation

tests/Makefile: Remove unused test-obj-y variable

PATCH Superseded Thomas Huth 2 participants 2 messages May 6, 2019 – May 7, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/Makefile: Remove unused test-obj-y variable

I recently noticed that test-obj-y contains a file called tests/check-block-qtest.o which simply does not belong to any .c file and thus wondered why this is not causing any trouble. Well, if I get the Makefile magic right, test-obj-y is not really used for anything - and "make check" still works fine if we simply remove it.

---
 tests/Makefile.include | 19 -------------------
 1 file changed, 19 deletions(-)
tests/Makefile.include +0 -19
index 7c8b9c84b2..dfc4b7746f 100644
@@ -482,25 +482,6 @@ GENERATED_FILES += tests/test-qapi-types.h \
 	tests/test-qapi-events-sub-sub-module.h \
 	tests/test-qapi-introspect.h
 
-test-obj-y = tests/check-qnum.o tests/check-qstring.o tests/check-qdict.o \
-	tests/check-qlist.o tests/check-qnull.o tests/check-qobject.o \
-	tests/check-qjson.o tests/check-qlit.o \
-	tests/check-block-qtest.o \
-	tests/test-coroutine.o tests/test-string-output-visitor.o \
-	tests/test-string-input-visitor.o tests/test-qobject-output-visitor.o \
-	tests/test-clone-visitor.o \
-	tests/test-qobject-input-visitor.o \
-	tests/test-qmp-cmds.o tests/test-visitor-serialization.o \
-	tests/test-x86-cpuid.o tests/test-mul64.o tests/test-int128.o \
-	tests/test-opts-visitor.o tests/test-qmp-event.o \
-	tests/rcutorture.o tests/test-rcu-list.o \
-	tests/test-rcu-simpleq.o \
-	tests/test-rcu-tailq.o \
-	tests/test-qdist.o tests/test-shift128.o \
-	tests/test-qht.o tests/qht-bench.o tests/test-qht-par.o \
-	tests/atomic_add-bench.o tests/atomic64-bench.o
-
-$(test-obj-y): QEMU_INCLUDES += -Itests
 QEMU_CFLAGS += -I$(SRC_PATH)/tests
 
 
Signature · 1 line
2.21.0
#1 lore raw
Quoted 8 lines · Thomas Huth

I recently noticed that test-obj-y contains a file called tests/check-block-qtest.o which simply does not belong to any .c file and thus wondered why this is not causing any trouble. Well, if I get the Makefile magic right, test-obj-y is not really used for anything - and "make check" still works fine if we simply remove it.

It is used to add -Itests to the command line (which refers to the build directory). However, it is not needed because "-iquote $(@D)" already sets this up in rules.mak.

Paolo

Quoted 35 lines
---
 tests/Makefile.include | 19 -------------------
 1 file changed, 19 deletions(-)
tests/Makefile.include +0 -19
index 7c8b9c84b2..dfc4b7746f 100644
@@ -482,25 +482,6 @@ GENERATED_FILES += tests/test-qapi-types.h \
 	tests/test-qapi-events-sub-sub-module.h \
 	tests/test-qapi-introspect.h
 
-test-obj-y = tests/check-qnum.o tests/check-qstring.o tests/check-qdict.o \
-	tests/check-qlist.o tests/check-qnull.o tests/check-qobject.o \
-	tests/check-qjson.o tests/check-qlit.o \
-	tests/check-block-qtest.o \
-	tests/test-coroutine.o tests/test-string-output-visitor.o \
-	tests/test-string-input-visitor.o tests/test-qobject-output-visitor.o \
-	tests/test-clone-visitor.o \
-	tests/test-qobject-input-visitor.o \
-	tests/test-qmp-cmds.o tests/test-visitor-serialization.o \
-	tests/test-x86-cpuid.o tests/test-mul64.o tests/test-int128.o \
-	tests/test-opts-visitor.o tests/test-qmp-event.o \
-	tests/rcutorture.o tests/test-rcu-list.o \
-	tests/test-rcu-simpleq.o \
-	tests/test-rcu-tailq.o \
-	tests/test-qdist.o tests/test-shift128.o \
-	tests/test-qht.o tests/qht-bench.o tests/test-qht-par.o \
-	tests/atomic_add-bench.o tests/atomic64-bench.o
-
-$(test-obj-y): QEMU_INCLUDES += -Itests
 QEMU_CFLAGS += -I$(SRC_PATH)/tests