mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-02 08:42:32 +00:00
tests: Use gst-validate-launcher to run python tests
This commit is contained in:
parent
af2ee3f723
commit
1ddc54ee05
3 changed files with 14 additions and 42 deletions
16
configure.ac
16
configure.ac
|
@ -179,20 +179,10 @@ if test "x$HAVE_UNISTD_H" != "xyes"; then
|
||||||
GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
|
GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl *** checks for nose2 ***
|
dnl *** checks for gst-validate-launcher ***
|
||||||
|
|
||||||
AC_MSG_CHECKING(for nose2)
|
AC_CHECK_PROG(GST_VALIDATE_LAUNCHER, gst-validate-launcher, yes)
|
||||||
NOSE2=nose2
|
AM_CONDITIONAL(HAVE_GST_VALIDATE_LAUNCHER, [test "x$GST_VALIDATE_LAUNCHER" = "xyes"])
|
||||||
if $NOSE2 1>&AC_FD_CC 2>&AC_FD_CC
|
|
||||||
then
|
|
||||||
HAVE_NOSE2=yes
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
else
|
|
||||||
HAVE_NOSE2=no
|
|
||||||
AC_MSG_RESULT(no nose2)
|
|
||||||
fi
|
|
||||||
AC_SUBST([NOSE2])
|
|
||||||
AM_CONDITIONAL(HAVE_NOSE2, test "x$HAVE_NOSE2" = "xyes")
|
|
||||||
|
|
||||||
dnl *** checks for types/defines ***
|
dnl *** checks for types/defines ***
|
||||||
|
|
||||||
|
|
|
@ -129,11 +129,11 @@ coverage-report:
|
||||||
done
|
done
|
||||||
|
|
||||||
check:
|
check:
|
||||||
if HAVE_NOSE2
|
if HAVE_GST_VALIDATE_LAUNCHER
|
||||||
if WITH_PYTHON
|
if WITH_PYTHON
|
||||||
GI_TYPELIB_PATH=$(top_srcdir)/ges/:${GI_TYPELIB_PATH} LD_LIBRARY_PATH=$(top_srcdir)/ges/.libs:${LD_LIBRARY_PATH} ${NOSE2} --verbose -s $(top_srcdir)/tests/check/python
|
GI_TYPELIB_PATH=$(top_srcdir)/ges/:${GI_TYPELIB_PATH} LD_LIBRARY_PATH=$(top_srcdir)/ges/.libs:${LD_LIBRARY_PATH} gst-validate-launcher --pyunittest-dir $(top_srcdir)/tests/check/ pyunittest --dump-on-failure
|
||||||
|
|
||||||
check-python:
|
check-python:
|
||||||
GI_TYPELIB_PATH=$(top_srcdir)/ges/:${GI_TYPELIB_PATH} LD_LIBRARY_PATH=$(top_srcdir)/ges/.libs:${LD_LIBRARY_PATH} ${NOSE2} --verbose -s $(top_srcdir)/tests/check/python
|
GI_TYPELIB_PATH=$(top_srcdir)/ges/:${GI_TYPELIB_PATH} LD_LIBRARY_PATH=$(top_srcdir)/ges/.libs:${LD_LIBRARY_PATH} gst-validate-launcher --pyunittest-dir $(top_srcdir)/tests/check/ pyunittest --dump-on-failure
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -72,33 +72,15 @@ foreach t : ges_tests
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if build_gir
|
if build_gir
|
||||||
runtests = find_program('nose2', required : false)
|
# Make sure to use the subproject gst-validate-launcher if avalaible.
|
||||||
|
if gstvalidate_dep.found() and gstvalidate_dep.type_name() == 'internal'
|
||||||
|
runtests = subproject('gst-devtools').get_variable('launcher')
|
||||||
|
else
|
||||||
|
runtests = find_program('gst-validate-launcher', required : false)
|
||||||
|
endif
|
||||||
|
|
||||||
if runtests.found()
|
if runtests.found()
|
||||||
testdir = '@0@/python/'.format(meson.current_source_dir())
|
test('pythontests', runtests, args: ['--pyunittest-dir', meson.current_source_dir(), 'pyunittest', '--dump-on-failure'],
|
||||||
|
env: env)
|
||||||
tests = [
|
|
||||||
['Test clip', 'test_clip'],
|
|
||||||
['Test timeline', 'test_timeline'],
|
|
||||||
['Test groups', 'test_group']
|
|
||||||
]
|
|
||||||
|
|
||||||
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 = ['--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)
|
|
||||||
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
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue