diff options
author | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2016-09-13 12:31:54 -0300 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@osg.samsung.com> | 2016-10-11 19:22:47 +0200 |
commit | aec1442d4cc9902e5e5ce1fe1a08acd5f9e9af2e (patch) | |
tree | 6d14595906f6e86eed9484bd5c4bba1371afdb8a | |
parent | a44e49fafee0a351192540d778726fd58021f36a (diff) |
meson: Add python tests
-rw-r--r-- | tests/check/meson.build | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/check/meson.build b/tests/check/meson.build index 4434c562..649eaebd 100644 --- a/tests/check/meson.build +++ b/tests/check/meson.build @@ -73,3 +73,29 @@ foreach t : ges_tests ) endif endforeach + +if build_gir + 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 + + if runtests.found() + testdir = '@0@/python/'.format(meson.current_source_dir()) + + tests = [ + ['Test clip', 'test_clip.py'], + ['Test timeline', 'test_timeline.py'], + ['Test groups', 'test_group.py'] + ] + + foreach i: tests + env = environment() + env.prepend('GI_TYPELIB_PATH', meson.current_build_dir() + '/../../ges/') + env.prepend('LD_LIBRARY_PATH', meson.current_build_dir() + '/../../ges/') + args = ['--with-xunit', '--xunit-file=' + meson.current_build_dir() + i.get(0).underscorify() + '.xunit'] + test(i.get(0), runtests, args: args + [testdir + '/' + i.get(1)], env: env) + endforeach + endif +endif |