-
Notifications
You must be signed in to change notification settings - Fork 77
Work In Progress Mender Integration Tests
These tests are only supported after https://github.com/BoulderAI/meta-mender-community/pull/1 (not yet merged)
For more information about standalone mode, see the Mender Documentation You can speed up testing and deployment for local installs using a http server on your build system. For instance:
python -m SimpleHTTPServer 8080
in the build directory of the Yocto build tree. Then to use with mender install:
MACHINE=jetson-tx2 mender -install http://<your-build-system-ip:8080/tmp/deploy/images/${MACHINE}/demo-image-base-${MACHINE}.mender
- Tegraflash the initial image.
- View logs with
journalctl -u mender-client-commit
- Ensure sure no warning or error messages are printed.
- Make a note of the current root partition mountpoint using
df | grep mmcblk0p
- The initial partition should be 1 after tegraflash
- For all platforms other than nano, examine the current boot slot using
nvbootctrl get-current-slot
- The initial slot should be 0 after tegraflash.
- Install the mender update file from the command line using
mender -install
- Reboot
- View logs with
journalctl -u mender-client-commit
- Verify messages include "Committing update"
- Verify no error or warning messages were included.
- Examine the current root partition mountpoint using
df | grep mmcblk0p
- The root partition should have changed to a different location, based on
APP_b
partition in the corresponding device flash layout. As long as it's not 1 this part is successful.
- For all platforms other than nano, examine the current boot slot using
nvbootctrl get-current-slot
- The slot should be 1 after the first successful update.
- Reboot without updating
- View logs with
journalctl -u mender-client-commit
- Verify messages do not include "Committing update"
- Verify no error or warning messages are printed
- Examine the current root partition mountpoint using
df | grep mmcblk0p
- The rootfs partition should not have changed, should match the
APP_b
partition as found above.
- For all platforms other than nano, examine the current boot slot using
nvbootctrl get-current-slot
- The slot should be 1 after the first successful update.
- Start a mender update using
mender -install
- While update is in progress, power down the system.
- Reconnect power and boot the system.
- View logs with
journalctl -u mender-client-commit
- Verify messages do not include "Committing update"
- Verify no error or warning messages are printed
- Examine the current root partition mountpoint using
df | grep mmcblk0p
- The root partition should not have changed.
- Install the mender update file from the command line using
mender -install
- Reboot
- View logs with
journalctl -u mender-client-commit
- Verify messages include "Committing update"
- Verify no error or warning messages were included.
See logic in https://github.com/BoulderAI/meta-mender-community/pull/1 - this additional logic specific to TX2 and u-boot slot alignment is verified with this test case.
- After completing the tests above, force the system into the wrong boot slot with
nvbootctrl set-active-boot-slot X
where X is the opposite boot slot as the one returned bynvbootctrl get-current-slot
- Reboot the system
- View logs with
journalctl -u mender-client-commit
- Verify messages include a warning about partition mismatch and a request to reboot the device.
- Attempt to use
mender -install
to perform an update
- Verify the update fails with message stating a partition mismatch was detected.
- Attempt to deploy an update via the mender server.
- Verify the device is not available (mender client has stopped).
- Reboot
- View logs with
journalctl -u mender-client-commit
- Verify messages show successful validation of root filesystem partition and boot slots.
- Verify no warning or error messages are printed.
- Perform an update with
mender -install
- Update succeeds
When changing uboot related software (for Nano and TX2), these tests help verify things are still working in u-boot land. This is a subset of the integration checklist found in the Mender manual. These tests require a serial port UART connection to debug U-boot.
- Set an environment variable from Linux using fw_printenv
fw_setenv test_from_linux 1
- Reboot and interrupt u-boot.
- Print the environment variable value
printenv test_from_linux
- You should see a value of 1 printed for the variable from uboot.
- Create and save a u-boot variable
setenv test_from_uboot 1
saveenv
- Boot the system
run bootcmd
- From the linux terminal print the uboot value
fw_printenv test_from_uboot
- You should see a value of 1 printed from Linux.