From 0728e09c757e1e1f49cac6d864f85bf3402409ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sedl=C3=A1k?= Date: Tue, 16 Aug 2016 09:33:10 +0200 Subject: [PATCH] enable ENTRYPOINT to be more than one test, ensure shutdown when on ARM This adds possiblity to specify more than one test in ENTRYPOINT variable - test names should be separated with spaces and loading is done as with POSTINSTALL. Add _console_shutdown test to ARM image deployment. Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D973 --- VARIABLES.md | 2 +- main.pm | 6 +++++- templates | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/VARIABLES.md b/VARIABLES.md index 49d46bdb..163d85d8 100644 --- a/VARIABLES.md +++ b/VARIABLES.md @@ -56,7 +56,7 @@ it also means that `B` conflicts `A` even if not shown in the table). | -------- | :------------: | ---------------------- | :-------: | ----------- | | `LIVE` | boolean | not set | technically `PACKAGE_SET`, `KICKSTART`, `MIRRORLIST_GRAPHICAL`, `REPOSITORY_GRAPHICAL`, `REPOSITORY_VARIATION` | specify that the test is running on Live system - additional steps are required (starting Anaconda...) | | `PACKAGE_SET` | string (`minimal`, `default`, ...) | `minimal`; `default` when `LIVE` is set | nothing | sets packageset to install - you have to add appropriate needles, see `tests/_software_selection.pm` | -| `ENTRYPOINT` | filename | not set | N/A | set `ENTRYPOINT` to load specific test directly (bypass modular structure, mainly usable for testing) | +| `ENTRYPOINT` | filename | not set | N/A | set `ENTRYPOINT` to load specific test directly (bypass modular structure, mainly usable for testing). If you want to run more than one test, separate them with space. | | `UPGRADE` | string (`minimal`, `desktop`, `encrypted`, ...) | not set | all except of `LIVE` and `USER_PASSWORD` | when set, do an upgrade test of specified type | | `KICKSTART` | boolean | `false`/not set | all | when specified, do an kickstart installation (you should use `GRUB` variable to specify where kickstart file resides) | | `MIRRORLIST_GRAPHICAL` | boolean | `false`/not set | `REPOSITORY_GRAPHICAL` | sets installation source to mirrorlist | diff --git a/main.pm b/main.pm index dc60d639..c5371c20 100644 --- a/main.pm +++ b/main.pm @@ -217,8 +217,12 @@ sub load_postinstall_tests() { # if user set ENTRYPOINT, run required test directly # (good for tests where it doesn't make sense to use _boot_to_anaconda, _software_selection etc.) +# if you want to run more than one test via ENTRYPOINT, separate them with space if (get_var("ENTRYPOINT")) { - autotest::loadtest "tests/".get_var("ENTRYPOINT").".pm"; + my @entrs = split(/ /, get_var("ENTRYPOINT")); + foreach my $entr (@entrs) { + autotest::loadtest "tests/${entr}.pm"; + } } elsif (get_var("UPGRADE")) { load_upgrade_tests; diff --git a/templates b/templates index d0956fa6..326a9ca7 100755 --- a/templates +++ b/templates @@ -1421,7 +1421,8 @@ { name => "install_arm_image_deployment_upload", settings => [ - { key => "ENTRYPOINT", value => "install_arm_image_deployment" }, + # run ARM entrypoint and also make sure that VM shuts down correctly + { key => "ENTRYPOINT", value => "install_arm_image_deployment _console_shutdown" }, # we don't want HDD_2 to be really connected, but we need to use it to download # HDD ISO, see https://github.com/os-autoinst/openQA/issues/684 { key => "NUMDISKS", value => "1" },