tests: Fix running python unit tests
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Tue, 15 Nov 2016 21:34:44 +0000 (18:34 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Tue, 15 Nov 2016 22:11:39 +0000 (19:11 -0300)
Adding missing nose2-junit-xml.cfg.in file and minor fixes in
the way we call nose2 also making sure the .xunit files end
up in the right place.

tests/check/meson.build
tests/check/nose2-junit-xml.cfg.in [new file with mode: 0644]

index aa7644f..2f6de7c 100644 (file)
@@ -93,13 +93,15 @@ if build_gir
       env.prepend('GI_TYPELIB_PATH', meson.current_build_dir() + '/../../ges/')
       env.prepend('LD_LIBRARY_PATH', meson.current_build_dir() + '/../../ges/')
 
-      args = ['--project-directory', meson.current_source_dir() + '/../..',
-              '--start-dir', meson.current_source_dir()]
-      xunitfile = '' + i.get(0).underscorify() + '.xunit'
+      args = ['--start-dir', meson.current_source_dir()]
+      xunitfile = join_paths(meson.current_build_dir(), i.get(0).underscorify() + '.xunit')
       config = configuration_data()
       config.set('path', xunitfile)
-      configure_file(input : 'nose2-junit-xml.cfg.in', configuration : config, output : xunitfile + '.cfg')
-      args = args + ['--plugin', 'nose2.plugins.junitxml', '--config', meson.current_build_dir() + '/' + xunitfile + '.cfg']
+      cfg = '' + i.get(0).underscorify() + '.cfg'
+      configure_file(input : 'nose2-junit-xml.cfg.in', configuration : config,
+        output : cfg)
+      args = args + ['--plugin', 'nose2.plugins.junitxml', '--config',
+          join_paths(meson.current_build_dir(), cfg)]
 
       test(i.get(0), runtests, args: args + ['python.' + i.get(1)], env: env)
     endforeach
diff --git a/tests/check/nose2-junit-xml.cfg.in b/tests/check/nose2-junit-xml.cfg.in
new file mode 100644 (file)
index 0000000..335e33d
--- /dev/null
@@ -0,0 +1,3 @@
+[junit-xml]
+always-on = True
+path = @path@