summaryrefslogtreecommitdiffstats
path: root/test/sysfs/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:22:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:22:29 +0000
commit068a45420f2c98887e220b45e946cc7074da550e (patch)
treec5b54e8b4b235232b057a9c534d9a16d2208463d /test/sysfs/meson.build
parentInitial commit. (diff)
downloadlibnvme-068a45420f2c98887e220b45e946cc7074da550e.tar.xz
libnvme-068a45420f2c98887e220b45e946cc7074da550e.zip
Adding upstream version 1.8.upstream/1.8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/sysfs/meson.build')
-rw-r--r--test/sysfs/meson.build29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/sysfs/meson.build b/test/sysfs/meson.build
new file mode 100644
index 0000000..c004fc0
--- /dev/null
+++ b/test/sysfs/meson.build
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# This file is part of libnvme.
+# Copyright (c) 2024 SUSE LLC.
+#
+# Authors: Daniel Wagner <dwagner@suse.de>
+
+
+sysfs = executable(
+ 'test-sysfs',
+ ['sysfs.c'],
+ dependencies: libnvme_dep,
+ include_directories: [incdir, internal_incdir]
+)
+
+sysfs_files= [
+ 'nvme-sysfs-tw-carbon-6.8.0-rc1+'
+]
+
+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