summaryrefslogtreecommitdiffstats
path: root/test/sysfs/meson.build
blob: 2a7e8e3cd833c214592a1e28171bca4c1622717f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 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>

diff = find_program('diff', required : false)
if diff.found()
    tree_dump = executable(
        'test-tree-dump',
        ['tree-dump.c'],
        dependencies: libnvme_dep,
        include_directories: [incdir],
    )

    tree_data = [
        'tree-pcie',
    ]

    tree_diff = find_program('tree-diff.sh')

    foreach t_file : tree_data
        test(
            t_file,
            tree_diff,
            args : [
                meson.current_build_dir(),
                tree_dump.full_path(),
                files('data'/t_file + '.tar.xz'),
                files('data'/t_file + '.out'),
            ],
            depends : tree_dump,
        )
    endforeach
endif