aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meson.build14
-rw-r--r--test/meson.build39
2 files changed, 29 insertions, 24 deletions
diff --git a/meson.build b/meson.build
index f50c8f52..be430a13 100644
--- a/meson.build
+++ b/meson.build
@@ -222,20 +222,6 @@ endif
# Support #
###########
-ttl_metadata_files = files(
- 'test/extra/abbreviate/manifest.ttl',
- 'test/extra/bad/manifest.ttl',
- 'test/extra/big/manifest.ttl',
- 'test/extra/good/manifest.ttl',
- 'test/extra/lax/manifest.ttl',
- 'test/extra/perfect/manifest.ttl',
- 'test/extra/prefix/manifest.ttl',
- 'test/extra/pretty/manifest.ttl',
- 'test/extra/qualify/manifest.ttl',
- 'test/extra/root/manifest.ttl',
- 'serd.ttl',
-)
-
subdir('scripts')
if not get_option('tests').disabled()
diff --git a/test/meson.build b/test/meson.build
index 9662f9f3..f6f56c2b 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -8,20 +8,38 @@ wrapper = meson.get_external_property('exe_wrapper', '')
# Scripts and Metadata #
########################
-plot_scripts = files(
+plot_script_paths = [
'../scripts/serd_bench.py',
-)
+]
-simple_scripts = files(
+simple_script_paths = [
'../scripts/check_formatting.py',
'serd_test_util/__init__.py',
'run_suite.py',
'test_quiet.py',
'test_stdin.py',
'test_write_error.py',
-)
+]
+
+ttl_metadata_file_paths = [
+ '../serd.ttl',
+ 'extra/abbreviate/manifest.ttl',
+ 'extra/bad/manifest.ttl',
+ 'extra/big/manifest.ttl',
+ 'extra/full/manifest.ttl',
+ 'extra/good/manifest.ttl',
+ 'extra/lax/manifest.ttl',
+ 'extra/perfect/manifest.ttl',
+ 'extra/prefix/manifest.ttl',
+ 'extra/pretty/manifest.ttl',
+ 'extra/qualify/manifest.ttl',
+ 'extra/root/manifest.ttl',
+]
-python_scripts = simple_scripts + plot_scripts
+plot_scripts = files(plot_script_paths)
+simple_scripts = files(simple_script_paths)
+python_script_paths = simple_script_paths + plot_script_paths
+python_scripts = plot_scripts + simple_scripts
if get_option('lint')
# Check release metadata
@@ -47,8 +65,9 @@ if get_option('lint')
black = find_program('black', required: false)
if black.found()
black_opts = ['--check', '-q', '-l', '79']
- foreach script : python_scripts
- name = '@0@'.format(script).underscorify()
+ foreach script_path : python_script_paths
+ script = files(script_path)
+ name = script_path.underscorify()
test(name, black, args: black_opts + [script], suite: 'scripts')
endforeach
endif
@@ -79,11 +98,11 @@ if get_option('lint')
endif
# Check Turtle formatting with serdi
- foreach ttl_file : ttl_metadata_files
+ foreach ttl_file_path : ttl_metadata_file_paths
test(
- '@0@'.format(ttl_file).underscorify(),
+ ttl_file_path.underscorify(),
check_formatting_py,
- args: [ttl_file, serdi, '-o', 'turtle'],
+ args: [files(ttl_file_path), serdi, '-o', 'turtle'],
suite: 'data',
)
endforeach