Re: [PATCH 1/2] tests: fix "make check-qtest" for modular builds
On Mon, Jul 13, 2020 at 07:36:20AM +0200, Thomas Huth wrote: > On 10/07/2020 22.36, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > --- > > tests/qtest/Makefile.include | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include > > index 98af2c2d9338..6a0276fd42dd 100644 > > --- a/tests/qtest/Makefile.include > > +++ b/tests/qtest/Makefile.include > > @@ -277,6 +277,7 @@ tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o > > $(libqos-pc-obj-y) > > tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o > > tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o > > tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o > > +tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o > > tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o > > tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o > > tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o > > What was the error that you run into here? ... some words in the commit > message would be nice. Actually, I always wondered why we need a > separate entry for each and every test here ... I'd rather expect that > this is handled by a normal generic make rule instead? With this line the build is done in two steps: gcc -o test.o test.c gcc -o test test.o -llib Without this line the build is done in one step: gcc -o test test.c -llib The later seems to not pick up all cflags needed, I got build errors due to an include file not being found (out-of-tree build). take care, Gerd
Re: [PATCH 1/2] tests: fix "make check-qtest" for modular builds
On 10/07/2020 22.36, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > tests/qtest/Makefile.include | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include > index 98af2c2d9338..6a0276fd42dd 100644 > --- a/tests/qtest/Makefile.include > +++ b/tests/qtest/Makefile.include > @@ -277,6 +277,7 @@ tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o > $(libqos-pc-obj-y) > tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o > tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o > tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o > +tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o > tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o > tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o > tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o What was the error that you run into here? ... some words in the commit message would be nice. Actually, I always wondered why we need a separate entry for each and every test here ... I'd rather expect that this is handled by a normal generic make rule instead? Thomas
[PATCH 1/2] tests: fix "make check-qtest" for modular builds
Signed-off-by: Gerd Hoffmann --- tests/qtest/Makefile.include | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include index 98af2c2d9338..6a0276fd42dd 100644 --- a/tests/qtest/Makefile.include +++ b/tests/qtest/Makefile.include @@ -277,6 +277,7 @@ tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o $(libqos-pc-obj-y) tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o +tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o -- 2.18.4