mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
meson: tests: add test scripts
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
db33df7d0f
commit
59cafec0a4
@ -16,38 +16,6 @@
|
|||||||
## License along with this library. If not, see
|
## License along with this library. If not, see
|
||||||
## <http://www.gnu.org/licenses/>.
|
## <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
|
if WITH_LINUX
|
||||||
check-access: file-access-clean
|
check-access: file-access-clean
|
||||||
VIR_TEST_FILE_ACCESS=1 $(MAKE) $(AM_MAKEFLAGS) check
|
VIR_TEST_FILE_ACCESS=1 $(MAKE) $(AM_MAKEFLAGS) check
|
||||||
@ -59,8 +27,6 @@ file-access-clean:
|
|||||||
> test_file_access.txt
|
> test_file_access.txt
|
||||||
endif WITH_LINUX
|
endif WITH_LINUX
|
||||||
|
|
||||||
TESTS = $(test_scripts)
|
|
||||||
|
|
||||||
VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \
|
VALGRIND = valgrind --quiet --leak-check=full --trace-children=yes \
|
||||||
--trace-children-skip="*/tools/virsh","*/tests/commandhelper","/usr/bin/*" \
|
--trace-children-skip="*/tools/virsh","*/tests/commandhelper","/usr/bin/*" \
|
||||||
--suppressions=$(abs_srcdir)/.valgrind.supp
|
--suppressions=$(abs_srcdir)/.valgrind.supp
|
||||||
|
@ -641,3 +641,40 @@ foreach data : helpers
|
|||||||
export_dynamic: true,
|
export_dynamic: true,
|
||||||
)
|
)
|
||||||
endforeach
|
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
|
||||||
|
@ -15,13 +15,13 @@ fi
|
|||||||
|
|
||||||
output="/dev/null"
|
output="/dev/null"
|
||||||
use_valgrind=""
|
use_valgrind=""
|
||||||
ld_library_path="../src/"
|
ld_library_path="$abs_top_builddir/src/"
|
||||||
if [ ! -z "$1" ] && [ "$1" = "-d" ]; then
|
if [ ! -z "$1" ] && [ "$1" = "-d" ]; then
|
||||||
output="/dev/stdout"
|
output="/dev/stdout"
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exe="../src/virt-aa-helper"
|
exe="$abs_top_builddir/src/virt-aa-helper"
|
||||||
if [ ! -z "$1" ]; then
|
if [ ! -z "$1" ]; then
|
||||||
if [ "$1" = "-v" ]; then
|
if [ "$1" = "-v" ]; then
|
||||||
use_valgrind="yes"
|
use_valgrind="yes"
|
||||||
|
Loading…
Reference in New Issue
Block a user