aboutsummaryrefslogtreecommitdiff
path: root/test/meson.build
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2022-04-16 15:13:08 -0500
committerGitHub <noreply@github.com>2022-04-16 15:13:08 -0500
commitfdfa6dbb0e69742029d53f0e163b8e7e7e6860f5 (patch)
tree6a300ef3e1b25e22224b042cc8a8c07b43709950 /test/meson.build
parent0b3f8750e7d307987eef9e63e327488a81c29a71 (diff)
rewrite tests (#515)
* rewrite tests to work with meson This ports our tests to meson and makes them able to be run in parallel. * add tests to ci * rewrite test/check-trailing-newlines in bash This test was using a GNU sed command which does not work on Alpine Linux.
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/meson.build b/test/meson.build
new file mode 100644
index 00000000..5f1274df
--- /dev/null
+++ b/test/meson.build
@@ -0,0 +1,26 @@
+if meson.version().version_compare('>=0.56.0')
+ build_root = meson.project_build_root()
+ source_root = meson.project_source_root()
+else
+ build_root = meson.build_root()
+ source_root = meson.source_root()
+endif
+
+test_env = [
+ 'BUILD_ROOT=' + build_root,
+ 'SOURCE_ROOT=' + source_root
+ ]
+
+check_obsolete_functions = find_program('check-obsolete-functions.sh')
+check_spacing_style = find_program('check-spacing-style.sh')
+check_trailing_newlines = find_program('check-trailing-newlines.sh')
+check_trailing_whitespace = find_program('check-trailing-whitespace.sh')
+check_xfunc_usage = find_program('check-xfunc-usage.sh')
+
+test('check for obsolete functions', check_obsolete_functions, env : test_env)
+test('check spacing style', check_spacing_style, env : test_env)
+test('check trailing newlines', check_trailing_newlines, env : test_env)
+test('check trailing whitespace', check_trailing_whitespace, env : test_env)
+test('check xfunc usage', check_xfunc_usage, env : test_env)
+
+subdir('units')