meson: Do not use path separator in test names
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 7 Jun 2017 16:08:43 +0000 (12:08 -0400)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 7 Jun 2017 16:26:46 +0000 (12:26 -0400)
Avoiding warnings like:

    WARNING: Target "elements/audioamplify" has a path separator in its name.

tests/check/meson.build

index 8019af3..a385d68 100644 (file)
@@ -31,7 +31,8 @@ libm = cc.find_library('m', required : false)
 # FIXME: valgrind_args: add suppressions $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-ugly.supp
 
 foreach t : ugly_tests
-  test_name = t.get(0)
+  fname = '@0@.c'.format(t.get(0))
+  test_name = t.get(0).underscorify()
   extra_deps = [ ]
   if t.length() == 3
     extra_deps = t.get(2)
@@ -42,7 +43,7 @@ foreach t : ugly_tests
     skip_test = false
   endif
   if not skip_test
-    exe = executable(test_name, '@0@.c'.format(test_name),
+    exe = executable(test_name, fname,
       include_directories : [configinc],
       c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,
       dependencies : [libm] + test_deps + extra_deps,