tests: Cleanup test files handling

This commit is contained in:
Thibault Saunier 2020-03-18 16:24:08 -03:00
parent 2d810bd7b7
commit cec1dd3302
9 changed files with 3 additions and 17 deletions

View file

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 216 KiB

View file

@ -31,20 +31,7 @@ typedef struct _DestroyedObjectStruct
gchar *
ges_test_get_audio_only_uri (void)
{
gchar *uri;
GFile *cfile, *fdir, *f_audio_only;
cfile = g_file_new_for_path (__FILE__);
fdir = g_file_get_parent (cfile);
f_audio_only = g_file_get_child (fdir, "audio_only.ogg");
uri = g_file_get_uri (f_audio_only);
gst_object_unref (cfile);
gst_object_unref (fdir);
gst_object_unref (f_audio_only);
return uri;
return ges_test_file_uri ("audio_only.ogg");
}
gchar *

View file

@ -28,7 +28,7 @@ ges_tests = [
test_defines = [
'-UG_DISABLE_ASSERT',
'-UG_DISABLE_CAST_CHECKS',
'-DGES_TEST_FILES_PATH="' + meson.current_source_dir() + '/ges/"',
'-DGES_TEST_FILES_PATH="@0@"'.format(join_paths(meson.current_source_dir(), 'assets')),
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
'-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
'-DGST_USE_UNSTABLE_API',

View file

@ -146,8 +146,7 @@ class TestTitleClip(unittest.TestCase):
class TestUriClip(common.GESSimpleTimelineTest):
def test_max_duration_on_extract(self):
uri = Gst.filename_to_uri(os.path.join(__file__, "../../ges/audio_video.ogg"))
asset = GES.UriClipAsset.request_sync(uri)
asset = GES.UriClipAsset.request_sync(common.get_asset_uri("audio_video.ogg"))
clip = asset.extract()
self.assertEqual(clip.props.max_duration, Gst.SECOND)