diff options
author | Petri Latvala <petri.latvala@intel.com> | 2018-08-08 14:07:01 +0300 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2018-08-09 10:34:03 +0300 |
commit | 6cb3d7dbe5831a7b2b5b7a4638d8a8b7ac624f5f (patch) | |
tree | 6d25159b083afc51b38f003ae87974eb795b06a0 /runner/meson.build | |
parent | 18c1e7525591b98b53321c26464f3181a5f7cce1 (diff) |
runner: Unit tests for the runner
TODO: Unit tests for the results.json file contents.
v2:
- Avoid writing the nul character to mock files
- Properly set up tmpdirs
v3:
- Restore the resume-related changes that were lost in rebase
v4:
- Better teardown for temporary directories
- Build with autotools
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'runner/meson.build')
-rw-r--r-- | runner/meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runner/meson.build b/runner/meson.build index 9dafb312..bea1d897 100644 --- a/runner/meson.build +++ b/runner/meson.build @@ -9,6 +9,7 @@ runnerlib_sources = [ 'settings.c', runner_sources = [ 'runner.c' ] resume_sources = [ 'resume.c' ] results_sources = [ 'results.c' ] +runner_test_sources = [ 'runner_tests.c' ] if _build_runner and jsonc.found() subdir('testdata') @@ -35,6 +36,13 @@ if _build_runner and jsonc.found() install_dir : bindir, dependencies : igt_deps) + runner_test = executable('runner_test', runner_test_sources, + c_args : '-DTESTDATA_DIRECTORY="@0@"'.format(testdata_dir), + link_with : runnerlib, + install : false, + dependencies : igt_deps) + test('runner', runner_test) + build_info += 'Build test runner: Yes' else build_info += 'Build test runner: No' |