diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:06:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 11:06:51 +0000 |
commit | 46f46dcc0ad7d0cda2f41c1ccfa137d2413ff209 (patch) | |
tree | 156a2dcee1cbe550b5014eb6a0833a1cee6bda65 /test/sysfs/meson.build | |
parent | Adding debian version 1.8-3. (diff) | |
download | libnvme-46f46dcc0ad7d0cda2f41c1ccfa137d2413ff209.tar.xz libnvme-46f46dcc0ad7d0cda2f41c1ccfa137d2413ff209.zip |
Merging upstream version 1.9.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/sysfs/meson.build')
-rw-r--r-- | test/sysfs/meson.build | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/test/sysfs/meson.build b/test/sysfs/meson.build index c004fc0..119fa97 100644 --- a/test/sysfs/meson.build +++ b/test/sysfs/meson.build @@ -5,25 +5,32 @@ # # Authors: Daniel Wagner <dwagner@suse.de> +diff = find_program('diff', required : false) +if diff.found() + sysfs_tree_print = executable( + 'sysfs-tree-print', + ['sysfs.c'], + dependencies: libnvme_dep, + include_directories: [incdir], + ) -sysfs = executable( - 'test-sysfs', - ['sysfs.c'], - dependencies: libnvme_dep, - include_directories: [incdir, internal_incdir] -) + sysfs_files= [ + 'nvme-sysfs-tw-carbon-6.8.0-rc1+' + ] -sysfs_files= [ - 'nvme-sysfs-tw-carbon-6.8.0-rc1+' -] + sysfs_tree_diff = find_program('sysfs-tree-diff.sh') -setup = find_program('setup.sh') - -foreach t_file : sysfs_files - r = run_command(setup, files('data'/t_file + '.tar.xz'), meson.current_build_dir(), check: true) - i = r.stdout().strip() - e0 = 'LIBNVME_SYSFS_PATH=' + i - e1 = 'LIBNVME_HOSTNQN=nqn.2014-08.org.nvmexpress:uuid:ce4fee3e-c02c-11ee-8442-830d068a36c6' - e2 = 'LIBNVME_HOSTID=ce4fee3e-c02c-11ee-8442-830d068a36c6' - test('sysfs', sysfs, args : [ i, t_file + '.out', files('data'/t_file + '.out') ], env : [ e0, e1, e2 ]) -endforeach + foreach t_file : sysfs_files + test( + 'sysfs', + sysfs_tree_diff, + args : [ + meson.current_build_dir(), + sysfs_tree_print.full_path(), + files('data'/t_file + '.tar.xz'), + files('data'/t_file + '.out'), + ], + depends : sysfs_tree_print, + ) + endforeach +endif |