]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests: add missing generated sources to testqapi
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 14 Oct 2020 11:20:17 +0000 (07:20 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Oct 2020 14:45:50 +0000 (10:45 -0400)
Ninja notices them due to a different order in visiting the graph.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/include/meson.build
tests/meson.build

index fea3a6342f6080e7469dd6c5b5143c59270f6abd..9abba308fa081bd4c910e429131db3e824ef5724 100644 (file)
@@ -10,7 +10,7 @@ test_qapi_outputs_extra = [
   'test-qapi-visit-sub-module.h',
 ]
 
-test_qapi_outputs_extra = custom_target('QAPI test (include)',
-                                        output: test_qapi_outputs_extra,
-                                        input: test_qapi_files,
-                                        command: 'true')
+test_qapi_files_extra = custom_target('QAPI test (include)',
+                                      output: test_qapi_outputs_extra,
+                                      input: test_qapi_files,
+                                      command: 'true')
index bf47a38c7466c5bec8aa7581a7ad6f59e7a02b5c..afeb6be689407feef77fb05c39fb9d5409652c15 100644 (file)
@@ -56,8 +56,18 @@ test_qapi_files = custom_target('Test QAPI files',
 # perhaps change qapi_gen to replace / with _, like Meson itself does?
 subdir('include')
 
-libtestqapi = static_library('testqapi', sources: [test_qapi_files, genh, test_qapi_outputs_extra])
-testqapi = declare_dependency(link_with: libtestqapi)
+test_qapi_sources = []
+test_qapi_headers = []
+i = 0
+foreach o: test_qapi_files.to_list() + test_qapi_files_extra.to_list()
+  if o.full_path().endswith('.h')
+    test_qapi_headers += o
+  endif
+  test_qapi_sources += o
+endforeach
+
+libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources])
+testqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers])
 
 testblock = declare_dependency(dependencies: [block], sources: 'iothread.c')