summaryrefslogtreecommitdiff
path: root/runner/meson.build
diff options
context:
space:
mode:
authorPetri Latvala <petri.latvala@intel.com>2018-10-23 15:20:24 +0300
committerPetri Latvala <petri.latvala@intel.com>2018-11-06 11:52:56 +0200
commite2d7d22ae7e69d30272f366034977ed5165911dd (patch)
tree811c1e8561c7873f5c45d652cb341ed07e9d83df /runner/meson.build
parent6d19a3b4bddb4d8716cf6b763ee784ba9bc9f440 (diff)
runner: Unit tests for json generation
Test the results.json generation with a top-down approach: With a directory of test run intermediary logs, check that the resulting json would match a reference json file. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'runner/meson.build')
-rw-r--r--runner/meson.build8
1 files changed, 8 insertions, 0 deletions
diff --git a/runner/meson.build b/runner/meson.build
index 6c4b4862..de6e6f1c 100644
--- a/runner/meson.build
+++ b/runner/meson.build
@@ -10,6 +10,7 @@ runner_sources = [ 'runner.c' ]
resume_sources = [ 'resume.c' ]
results_sources = [ 'results.c' ]
runner_test_sources = [ 'runner_tests.c' ]
+runner_json_test_sources = [ 'runner_json_tests.c' ]
if _build_runner and jsonc.found()
subdir('testdata')
@@ -46,6 +47,13 @@ if _build_runner and jsonc.found()
dependencies : igt_deps)
test('runner', runner_test)
+ runner_json_test = executable('runner_json_test', runner_json_test_sources,
+ c_args : '-DJSON_TESTS_DIRECTORY="@0@"'.format(join_paths(meson.current_source_dir(), 'json_tests_data')),
+ link_with : runnerlib,
+ install : false,
+ dependencies : [igt_deps, jsonc])
+ test('runner_json', runner_json_test)
+
build_info += 'Build test runner: Yes'
else
build_info += 'Build test runner: No'