diff mbox series

[1/2] tests: fix "make check-qtest" for modular builds

Message ID 20200710203652.9708-2-kraxel@redhat.com (mailing list archive)
State New, archived
Headers show
Series module fixes | expand

Commit Message

Gerd Hoffmann July 10, 2020, 8:36 p.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 tests/qtest/Makefile.include | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Huth July 13, 2020, 5:36 a.m. UTC | #1
On 10/07/2020 22.36, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  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
Gerd Hoffmann July 13, 2020, 6:38 a.m. UTC | #2
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 <kraxel@redhat.com>
> > ---
> >  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
diff mbox series

Patch

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