1
0
mirror of https://passt.top/passt synced 2024-07-01 23:42:41 +00:00

test: Split setup/teardown functions for build and distro tests

Currently the build tests and distro tests share a common setup function.
That works for now, but changes we want to make will mean they need
slightly different setup, so split the setup functions in preparation.

Currently, neither build nor distro tests have any teardown function.
Again, future changes are going to mean we need to do some teardown, so
create some empty for now teardown functions in preparation.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2022-08-18 16:13:53 +10:00 committed by Stefano Brivio
parent 058f847348
commit 2fa308ac6e
2 changed files with 19 additions and 0 deletions

View File

@ -23,6 +23,11 @@ setup_build() {
layout_host
}
# setup_distro() - Set up pane layout for distro tests
setup_distro() {
layout_host
}
# setup_passt() - Start qemu and passt
setup_passt() {
layout_passt
@ -281,6 +286,16 @@ setup_two_guests() {
pane_status GUEST_2
}
# teardown_build() - Nothing to do, yet
teardown_build() {
:
}
# teardown_distro() - Nothing to do, yet
teardown_distro() {
:
}
# teardown_passt() - Kill qemu, remove passt PID file
teardown_passt() {
tmux send-keys -t ${PANE_GUEST} "C-c"

View File

@ -63,10 +63,14 @@ run() {
test build/all
test build/cppcheck
test build/clang_tidy
teardown build
setup distro
test distro/debian
test distro/fedora
test distro/opensuse
test distro/ubuntu
teardown distro
setup pasta
test ndp/pasta