Commit 6b144a51 authored by Alexandru Băluț's avatar Alexandru Băluț

tests_: Use nose2 instead of nosetests

Also do not run the tests if the runner is not found.
Reviewed-by: Thibault Saunier's avatarThibault Saunier <tsaunier@gnome.org>
Differential Revision: https://phabricator.freedesktop.org/D1285
parent d520f6a2
......@@ -132,11 +132,11 @@
]
},
{
"name": "nose",
"config-opts": ["--module=nose==1.3.7"],
"name": "nose2",
"build-options" : {
"build-args": ["--share=network"]
},
"config-opts": ["--module=nose2==0.6.5"],
"sources": [
{
"type": "file",
......
runtests = find_program('nosetests3', required : false)
# On some distros it doesn't have the '3' suffix
if not runtests.found()
runtests = find_program('nosetests', required : false)
endif
runtests = find_program('nose2', required : false)
testdir = '@0@'.format(meson.current_source_dir())
if runtests.found()
tests = [
['Test application module', 'test_application'],
['Test check module', 'test_check'],
['Test clipproperties', 'test_clipproperties'],
['Test common utilities', 'test_common'],
['Test logging subsystem', 'test_log'],
['Test the main window', 'test_mainwindow'],
['Test the media library', 'test_media_library'],
['Test the misc utilities', 'test_misc'],
['Test the pipeline', 'test_pipeline'],
['Test the preference dialog', 'test_prefs'],
['Test presets', 'test_preset'],
['Test the previewer', 'test_previewers'],
['Test the project', 'test_project'],
['Test the keyboard shortcuts', 'test_shortcuts'],
['Test system integration', 'test_system'],
['Test graphical timeline elements', 'test_timeline_elements'],
['Test graphical layers', 'test_timeline_layer'],
['Test the graphical timeline', 'test_timeline_timeline'],
['Test undo/redo for the project', 'test_undo_project'],
['Test the undo subsystem', 'test_undo'],
['Test undo/redo in the timeline', 'test_undo_timeline'],
['Test utilities', 'test_utils'],
['Test the timeline utilities', 'test_utils_timeline'],
['Test our compound widget', 'test_widgets']
]
tests = [
['Test application module', 'test_application.py'],
['Test check module', 'test_check.py'],
['Test clipproperties', 'test_clipproperties.py'],
['Test common utilities', 'test_common.py'],
['Test logging subsystem', 'test_log.py'],
['Test the main window', 'test_mainwindow.py'],
['Test the media library', 'test_media_library.py'],
['Test the misc utilities', 'test_misc.py'],
['Test the pipeline', 'test_pipeline.py'],
['Test the preference dialog', 'test_prefs.py'],
['Test presets', 'test_preset.py'],
['Test the previewer', 'test_previewers.py'],
['Test the project', 'test_project.py'],
['Test the keyboard shortcuts', 'test_shortcuts.py'],
['Test system integration', 'test_system.py'],
['Test graphical timeline elements', 'test_timeline_elements.py'],
['Test graphical layers', 'test_timeline_layer.py'],
['Test the graphical timeline', 'test_timeline_timeline.py'],
['Test undo/redo for the project', 'test_undo_project.py'],
['Test the undo subsystem', 'test_undo.py'],
['Test undo/redo in the timeline', 'test_undo_timeline.py'],
['Test utilities', 'test_utils.py'],
['Test the timeline utilities', 'test_utils_timeline.py'],
['Test our compound widget', 'test_widgets.py']
]
foreach i: tests
args = ['-t', meson.source_root(), '-s', meson.current_source_dir()]
if get_option('enable-xunit')
xunitfile = '' + 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']
endif
foreach i: tests
args = []
if get_option('enable-xunit')
args = ['--with-xunit', '--xunit-file=' + i.get(0).underscorify() + '.xunit']
endif
test(i.get(0), runtests, args: args + [testdir + '/' + i.get(1)])
endforeach
test(i.get(0), runtests, args: args + ['tests.' + i.get(1)])
endforeach
endif
\ No newline at end of file
[junit-xml]
always-on = True
path = @path@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment