Skip to content

Commit

Permalink
[checkbox-ce-oem] Modify dbus warm cold boot job (BugFix) (#1038)
Browse files Browse the repository at this point in the history
* Modify the command called in the job

 Since we change the command name in test-strict-confinement snap.

Fix the wrong job name in test-plan
  • Loading branch information
rickwu666666 authored Aug 15, 2024
1 parent da7297d commit e76778e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 90 deletions.
Original file line number Diff line number Diff line change
@@ -1,71 +1,85 @@
id: dbus-cold-boot-reboot
id: strict-confinement/dbus-cold-boot
category_id: strict-confinement-mode
_summary: Perform cold reboot via dbus
_summary: Perform cold boot via dbus
_description: This test will check your system shutdown/booting cycle via dbus command.
unit: job
plugin: shell
environ: STRESS_BOOT_WAKEUP_DELAY RTC_DEVICE_FILE
command:
set -e
rtcwake -d "${RTC_DEVICE_FILE:-rtc0}" -v -m on -s "${STRESS_BOOT_WAKEUP_DELAY:-120}" &
test-strict-confinement.reboot cold
environ: STRESS_BOOT_WAKEUP_DELAY RTC_DEVICE_FILE PLAINBOX_SESSION_SHARE
user: root
flags: preserve-locale noreturn autorestart
estimated_duration: 180.0
depends: com.canonical.certification::init-boot-loop-data
imports:
from com.canonical.certification import snap
from com.canonical.certification import lsb
requires:
lsb.distributor_id == 'Ubuntu Core'
snap.name == 'test-strict-confinement'
depends: com.canonical.certification::init-boot-loop-data
command:
rtcwake -d "${RTC_DEVICE_FILE:-rtc0}" -v -m no -s "${STRESS_BOOT_WAKEUP_DELAY:-120}"
test-strict-confinement.dbus-cold-boot
sleep 60
touch "$PLAINBOX_SESSION_SHARE/coldboot_fail"
reboot


id: dbus-cold-boot-test
id: strict-confinement/dbus-cold-boot-test
category_id: strict-confinement-mode
_summary: Cold boot system configuration test via dbus
_description: This is a job to check system bootup without error after cold reboot.
_description: This is a job to check system bootup without error after cold boot.
unit: job
plugin: shell
environ: LD_LIBRARY_PATH
command:
reboot_check_test.sh -c "$PLAINBOX_SESSION_SHARE/before_reboot" -d "$PLAINBOX_SESSION_SHARE/cold_reboot" -s -f
environ: LD_LIBRARY_PATH PLAINBOX_SESSION_SHARE
user: root
flags: preserve-locale
estimated_duration: 1.0
depends: dbus-cold-boot-reboot
depends: strict-confinement/dbus-cold-boot
command:
if [ -f "$PLAINBOX_SESSION_SHARE/coldboot_fail" ]; then
echo "FAIL: Unexpected cold boot!"
exit 1
fi
reboot_check_test.sh -c "$PLAINBOX_SESSION_SHARE/before_reboot" -d "$PLAINBOX_SESSION_SHARE/cold_reboot" -s


id: dbus-warm-boot-reboot
id: strict-confinement/dbus-warm-boot
category_id: strict-confinement-mode
_summary: Perform warm reboot via dbus
_description: Perform warm reboot of the system via dbus command.
_summary: Perform warm boot via dbus
_description: Perform warm boot of the system via dbus command.
unit: job
plugin: shell
command:
test-strict-confinement.reboot warm
user: root
flags: preserve-locale noreturn autorestart
estimated_duration: 60s
environ: PLAINBOX_SESSION_SHARE
depends: com.canonical.certification::init-boot-loop-data
imports:
from com.canonical.certification import snap
from com.canonical.certification import lsb
requires:
lsb.distributor_id == 'Ubuntu Core'
snap.name == 'test-strict-confinement'
depends: com.canonical.certification::init-boot-loop-data
command:
test-strict-confinement.dbus-warm-boot
sleep 60
touch "$PLAINBOX_SESSION_SHARE/warmboot_fail"
reboot


id: dbus-warm-boot-test
id: strict-confinement/dbus-warm-boot-test
category_id: strict-confinement-mode
_summary: Warm boot system configuration test via dbus
_description: This is a job to check system bootup without error after warm reboot.
_description: This is a job to check system bootup without error after warm boot.
unit: job
plugin: shell
environ: LD_LIBRARY_PATH
command:
reboot_check_test.sh -c "$PLAINBOX_SESSION_SHARE/before_reboot" -d "$PLAINBOX_SESSION_SHARE/warm_reboot" -s -f
environ: LD_LIBRARY_PATH PLAINBOX_SESSION_SHARE
user: root
flags: preserve-locale
estimated_duration: 1.0
depends: dbus-warm-boot-reboot
depends: strict-confinement/dbus-warm-boot
command:
if [ -f "$PLAINBOX_SESSION_SHARE/warmboot_fail" ]; then
echo "FAIL: Unexpected warm boot!"
exit 1
fi
reboot_check_test.sh -c "$PLAINBOX_SESSION_SHARE/before_reboot" -d "$PLAINBOX_SESSION_SHARE/warm_reboot" -s
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
id: dbus-warm-boot
id: strict-confinement-dbus-warm-boot
unit: test plan
_name: Warm reboot test via dbus
_description:
Warm reboot test by using dbus command.
Rely on test-strict-confinement SNAP to test.
bootstrap_include:
com.canonical.certification::reboot-run-generator
mandatory_include:
com.canonical.certification::init-boot-loop-data
include:
dbus-warm-boot-boot
dbus-warm-boot-test
strict-confinement/dbus-warm-boot
strict-confinement/dbus-warm-boot-test


id: dbus-cold-boot
id: strict-confinement-dbus-cold-boot
unit: test plan
_name: Cold boot test via dbus
_description:
Cold boot test by using dbus command.
Rely on test-strict-confinement SNAP to test.
bootstrap_include:
com.canonical.certification::reboot-run-generator
mandatory_include:
com.canonical.certification::init-boot-loop-data
include:
dbus-cold-boot-boot
dbus-cold-boot-test
strict-confinement/dbus-cold-boot
strict-confinement/dbus-cold-boot-test


id: strict-confine-mediacard
Expand Down

This file was deleted.

0 comments on commit e76778e

Please sign in to comment.