diff --git a/tests/integration/testcases/build.bats b/tests/integration/testcases/build.bats index 8b64d0f..06c31d6 100644 --- a/tests/integration/testcases/build.bats +++ b/tests/integration/testcases/build.bats @@ -164,9 +164,33 @@ teardown_file() { requires-image-version "$DEFAULT_TEZI_IMAGE" "5.3.0" requires-device - # This test case assumes the previous one was executed. - local COMMIT='my-dev-branch' + local OUTDIR='fully_customized_image' + run torizoncore-builder build \ + --file "$SAMPLES_DIR/config/tcbuild-full-customization.yaml" \ + --set INPUT_IMAGE="$DEFAULT_TEZI_IMAGE" \ + --set OUTPUT_DIR="$OUTDIR" --force + + assert_success + assert_output --partial 'splash screen merged' + assert_output --partial 'Overlay sample_overlay.dtbo successfully applied.' + assert_output --partial 'Overlay custom-kargs_overlay.dtbo successfully applied.' + assert_output --partial \ + 'Kernel custom arguments successfully configured with "key1=val1 key2=val2".' + assert_output --partial 'Deploying commit ref: my-dev-branch' + local ARCHIVE='/storage/ostree-archive/' + local COMMIT='my-dev-branch' + + # Check output/easy-installer/{name,description,licence,release-notes}: + run cat "$OUTDIR/image.json" + assert_output --partial '"name": "fully-customized image"' + assert_output --partial '"description": "fully-customized image description"' + assert_output --partial '"license": "license-fc.html"' + assert_output --partial '"releasenotes": "release-notes-fc.html"' + + # Check presence of container: + run [ -e "$OUTDIR/docker-storage.tar.xz" -a -e "$OUTDIR/docker-compose.yml" ] + assert_success # Deploy custom image. run torizoncore-builder deploy --remote-host "$DEVICE_ADDR" \ diff --git a/tests/integration/testcases/dt.bats b/tests/integration/testcases/dt.bats index 9cb3530..97b194b 100644 --- a/tests/integration/testcases/dt.bats +++ b/tests/integration/testcases/dt.bats @@ -147,6 +147,7 @@ load 'lib/common.bash' @test "dt: deploy device tree in the device" { requires-device torizoncore-builder-shell "rm -rf device-trees" + torizoncore-builder images --remove-storage unpack $DEFAULT_TEZI_IMAGE run torizoncore-builder dt checkout --update if is-major-version-greater-than-5; then diff --git a/tests/integration/testcases/dto.bats b/tests/integration/testcases/dto.bats index 4111f33..cbc715c 100644 --- a/tests/integration/testcases/dto.bats +++ b/tests/integration/testcases/dto.bats @@ -106,6 +106,8 @@ bats_load_library 'bats/bats-file/load.bash' run device-shell "cat /proc/device-tree/tcb_prop_test" assert_failure 1 + torizoncore-builder images --remove-storage unpack $DEFAULT_TEZI_IMAGE + torizoncore-builder dto apply --force $SAMPLES_DIR/dts/sample_overlay.dts torizoncore-builder union branch1 run torizoncore-builder deploy \ --remote-host $DEVICE_ADDR --remote-username $DEVICE_USER \ @@ -134,6 +136,26 @@ bats_load_library 'bats/bats-file/load.bash' @test "dto: remove overlay from the device" { requires-device + # This test assumes that sample_overlay.dtbo is already + # present and used in the device + run device-shell "cat /proc/device-tree/tcb_prop_test" + assert_success + assert_output --partial "tcb_prop_value" + + # Recreate image with overlay + torizoncore-builder images --remove-storage unpack $DEFAULT_TEZI_IMAGE + torizoncore-builder dto apply --force $SAMPLES_DIR/dts/sample_overlay.dts + run torizoncore-builder dto status + assert_success + assert_output --partial "sample_overlay.dtbo" + + run torizoncore-builder dto remove sample_overlay.dtbo + assert_success + + run torizoncore-builder dto status + assert_success + refute_output --partial "sample_overlay.dtbo" + torizoncore-builder union branch2 run torizoncore-builder deploy \ --remote-host $DEVICE_ADDR --remote-username $DEVICE_USER \