## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
-test_scripts =
-libvirtd_test_scripts = \
- libvirtd-fail \
- libvirtd-pool \
- virsh-auth \
- virsh-cpuset \
- virsh-define-dev-segfault \
- virsh-int-overflow \
- virsh-optparse \
- virsh-read-bufsiz \
- virsh-read-non-seekable \
- virsh-schedinfo \
- virsh-self-test \
- virt-admin-self-test \
- virsh-checkpoint \
- virsh-snapshot \
- virsh-start \
- virsh-undefine \
- virsh-uriprecedence \
- virsh-vcpupin \
- $(NULL)
-
-if WITH_LIBVIRTD
-test_scripts += $(libvirtd_test_scripts)
-endif WITH_LIBVIRTD
-
-if WITH_SECDRIVER_APPARMOR
-if WITH_LIBVIRTD
-test_scripts += virt-aa-helper-test
-endif WITH_LIBVIRTD
-endif WITH_SECDRIVER_APPARMOR
-
if WITH_LINUX
check-access: file-access-clean
VIR_TEST_FILE_ACCESS=1 $(MAKE) $(AM_MAKEFLAGS) check
> test_file_access.txt
endif WITH_LINUX
-TESTS = $(test_scripts)
-
VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \
--trace-children-skip="*/tools/virsh","*/tests/commandhelper","/usr/bin/*" \
--suppressions=$(abs_srcdir)/.valgrind.supp
export_dynamic: true,
)
endforeach
+
+
+# test_scripts:
+# list of test scripts to run
+test_scripts = []
+
+if conf.has('WITH_LIBVIRTD')
+ test_scripts += [
+ 'libvirtd-fail',
+ 'libvirtd-pool',
+ 'virsh-auth',
+ 'virsh-checkpoint',
+ 'virsh-cpuset',
+ 'virsh-define-dev-segfault',
+ 'virsh-int-overflow',
+ 'virsh-optparse',
+ 'virsh-read-bufsiz',
+ 'virsh-read-non-seekable',
+ 'virsh-schedinfo',
+ 'virsh-self-test',
+ 'virsh-snapshot',
+ 'virsh-start',
+ 'virsh-undefine',
+ 'virsh-uriprecedence',
+ 'virsh-vcpupin',
+ 'virt-admin-self-test',
+ ]
+
+ if conf.has('WITH_SECDRIVER_APPARMOR')
+ test_scripts += 'virt-aa-helper-test'
+ endif
+endif
+
+foreach name : test_scripts
+ script = find_program(name)
+ test(name, script, env: tests_env)
+endforeach
output="/dev/null"
use_valgrind=""
-ld_library_path="../src/"
+ld_library_path="$abs_top_builddir/src/"
if [ ! -z "$1" ] && [ "$1" = "-d" ]; then
output="/dev/stdout"
shift
fi
-exe="../src/virt-aa-helper"
+exe="$abs_top_builddir/src/virt-aa-helper"
if [ ! -z "$1" ]; then
if [ "$1" = "-v" ]; then
use_valgrind="yes"