Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Grunau <janne-vlc@jannau.net>2020-09-20 10:55:36 +0300
committerJean-Baptiste Kempf <jb@videolan.org>2020-09-20 17:02:57 +0300
commitf90ada0d08e99ccfb676e59b8e3c497e77879915 (patch)
treee05bef8660fbc6ef8dbf2c69e8efcd372447fc2f
parenta5e45517ce055e557406b48299c33f274ab3d60c (diff)
tests: avoid using sed in header test
Makes !1078 redundant.
-rw-r--r--include/dav1d/meson.build4
-rw-r--r--tests/header_test.c (renamed from tests/header_test.c.in)2
-rw-r--r--tests/meson.build14
3 files changed, 6 insertions, 14 deletions
diff --git a/include/dav1d/meson.build b/include/dav1d/meson.build
index 19f0ad4..68faaf9 100644
--- a/include/dav1d/meson.build
+++ b/include/dav1d/meson.build
@@ -31,13 +31,13 @@ version_h_target = configure_file(input: 'version.h.in',
output: 'version.h',
configuration: version_h_data)
-dav1d_api_headers = files(
+dav1d_api_headers = [
'common.h',
'data.h',
'dav1d.h',
'headers.h',
'picture.h',
- )
+]
# install headers
install_headers(dav1d_api_headers,
diff --git a/tests/header_test.c.in b/tests/header_test.c
index aa0ba1a..dfe0dfb 100644
--- a/tests/header_test.c.in
+++ b/tests/header_test.c
@@ -25,7 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <dav1d/INPUT>
+#include DAV1D_TEST_HEADER
int main()
{
diff --git a/tests/meson.build b/tests/meson.build
index d13ec13..e26358f 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -110,20 +110,12 @@ c99_extension_flag = cc.first_supported_argument(
# dav1d_api_headers
foreach header : dav1d_api_headers
- header_file = '@0@'.format(header).split('/')[-1]
- target = header_file + '_test'
-
- header_test_source = custom_target(target,
- output : target + '.c',
- input : 'header_test.c.in',
- capture : true,
- command : ['sed', '-e', 's/INPUT/' + header_file + '/', '@INPUT@']
- )
+ target = header + '_test'
header_test_exe = executable(target,
- header_test_source,
+ 'header_test.c',
include_directories: dav1d_inc_dirs,
- c_args: [c99_extension_flag],
+ c_args: ['-DDAV1D_TEST_HEADER="@0@"'.format(header), c99_extension_flag],
build_by_default: true
)