From f12787f58db6dbfe94f4f850328a143232f6f342 Mon Sep 17 00:00:00 2001 From: Thomas Willetal Date: Sat, 4 Jul 2026 14:49:23 +0200 Subject: [PATCH 1/9] rof test hello world --- .github/actions/setup-podman/action.yml | 8 +++++ .github/workflows/_robot-tests.yml | 48 +++++++++++++++++++++++++ .github/workflows/_tooling.yml | 17 ++++++--- .github/workflows/ci-build.yml | 10 ++++++ .gitignore | 8 +++++ test/robot/requirements.txt | 4 +++ test/robot/run.sh | 17 +++++++++ test/robot/suites/hello_world.robot | 39 ++++++++++++++++++++ 8 files changed, 146 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/_robot-tests.yml create mode 100644 test/robot/requirements.txt create mode 100755 test/robot/run.sh create mode 100644 test/robot/suites/hello_world.robot diff --git a/.github/actions/setup-podman/action.yml b/.github/actions/setup-podman/action.yml index 954140f..2814e2b 100644 --- a/.github/actions/setup-podman/action.yml +++ b/.github/actions/setup-podman/action.yml @@ -101,6 +101,14 @@ runs: systemctl --user enable --now podman.socket echo "DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock" >> $GITHUB_ENV + - name: Expose Podman socket as /var/run/docker.sock + shell: bash + run: | + # GitHub Actions container-based actions mount /var/run/docker.sock + # hardcoded. Symlink it to the Podman socket so those actions work. + sudo ln -sf "$XDG_RUNTIME_DIR/podman/podman.sock" /var/run/docker.sock + sudo chmod 666 "$XDG_RUNTIME_DIR/podman/podman.sock" + - name: Verify Podman and podman-compose shell: bash run: | diff --git a/.github/workflows/_robot-tests.yml b/.github/workflows/_robot-tests.yml new file mode 100644 index 0000000..384315e --- /dev/null +++ b/.github/workflows/_robot-tests.yml @@ -0,0 +1,48 @@ +name: Robot Tests + +on: + workflow_call: + inputs: + release_version: + required: true + type: string + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +jobs: + robot-tests: + runs-on: ubuntu-24.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + + - name: Set up Podman + uses: ./.github/actions/setup-podman + + - name: Login to ghcr.io + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | \ + podman login ghcr.io \ + -u "${{ github.actor }}" \ + --password-stdin + + - name: Run Robot Framework tests + run: ./test/robot/run.sh + + - name: Robot Reporter + if: always() + uses: joonvena/robotframework-reporter-action@v2.5 + with: + gh_access_token: ${{ secrets.GITHUB_TOKEN }} + report_path: test/robot/results + + - name: Upload Robot results + if: always() + uses: actions/upload-artifact@v7 + with: + name: robot-results + path: test/robot/results + if-no-files-found: warn + retention-days: 7 diff --git a/.github/workflows/_tooling.yml b/.github/workflows/_tooling.yml index 26d1db4..f8a7629 100644 --- a/.github/workflows/_tooling.yml +++ b/.github/workflows/_tooling.yml @@ -45,13 +45,20 @@ jobs: command: just build release-version: ${{ inputs.release_version }} - - name: Publish test results - uses: dorny/test-reporter@v3 + - name: Publish Unit Test Results + uses: mikepenz/action-junit-report@v6 if: always() with: - name: Pytest Results - path: packtly-builder/tooling/python-test-results.xml - reporter: python-xunit + comment: true + detailed_summary: true + group_suite: true + include_passed: true + include_time_in_summary: true + job_summary: true + report_paths: packtly-builder/tooling/python-test-results.xml + simplified_summary: false + skip_success_summary: false + updateComment: true - name: Coverage summary uses: orgoro/coverage@ca0c362dc1a4f100447309405e6dfea47e251495 diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 969ac8d..8211b86 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -63,3 +63,13 @@ jobs: permissions: packages: write + robot-tests: + needs: + - runtime-manifest + uses: ./.github/workflows/_robot-tests.yml + with: + release_version: ${{ needs.version.outputs.release_version }} + secrets: inherit + permissions: + checks: write + pull-requests: write diff --git a/.gitignore b/.gitignore index bbbe7f2..c1ddb98 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,11 @@ cover/ python-test-results.xml test-output.xml *.log + +# Robot Framework artifacts +output.xml +report.html +log.html +xunit.xml +debugfile.txt +test/robot/results/ diff --git a/test/robot/requirements.txt b/test/robot/requirements.txt new file mode 100644 index 0000000..357978a --- /dev/null +++ b/test/robot/requirements.txt @@ -0,0 +1,4 @@ +robotframework +robotframework-requests +robotframework-jsonlibrary +robotframework-pythonlibcore diff --git a/test/robot/run.sh b/test/robot/run.sh new file mode 100755 index 0000000..bd305c9 --- /dev/null +++ b/test/robot/run.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# Install robotframework if not already installed +if ! pipx list --short | grep -q '^robotframework '; then + pipx install \ + --pip-args="-r ${ROOT}/requirements.txt" \ + robotframework +fi + +# Tests ausführen +robot \ + --outputdir "${ROOT}/results" \ + "${ROOT}/suites" + diff --git a/test/robot/suites/hello_world.robot b/test/robot/suites/hello_world.robot new file mode 100644 index 0000000..6cbba8d --- /dev/null +++ b/test/robot/suites/hello_world.robot @@ -0,0 +1,39 @@ +*** Settings *** +Documentation Hello World – Robot Framework Einstiegsbeispiel +... Zeigt grundlegende Keywords, Variablen und Log-Ausgaben. + +*** Variables *** +${GREETING} Hello, Robot World! +${NAME} Packtly Builder + +*** Test Cases *** + +Hello World Ausgabe + [Documentation] Gibt eine einfache Begrüßung aus. + Log ${GREETING} + Log To Console ${GREETING} + +Variablen verwenden + [Documentation] Demonstriert die Nutzung von Robot-Variablen. + ${message}= Set Variable Hello from ${NAME}! + Should Be Equal ${message} Hello from ${NAME}! + Log ${message} + +Einfache Assertion + [Documentation] Prüft arithmetische Gleichheit via BuiltIn. + ${result}= Evaluate 2 + 2 + Should Be Equal As Integers ${result} 4 + +Schleifen Demo + [Documentation] Iteriert über eine Liste und loggt jeden Eintrag. + @{items}= Create List alpha beta gamma + FOR ${item} IN @{items} + Log Item: ${item} + END + +*** Keywords *** + +Benutze Gruss + [Arguments] ${name} + [Documentation] Gibt einen personalisierten Gruß zurück. + RETURN Hello, ${name}! From a7018c23d2b974c0b13b8dc91678f05e3aeb0306 Mon Sep 17 00:00:00 2001 From: Thomas Willetal Date: Mon, 6 Jul 2026 18:08:26 +0200 Subject: [PATCH 2/9] add git checkout keyword and test case for systemd repository --- test/robot/keywords/git.robot | 18 ++++++++++++++++++ test/robot/suites/test_build_systemd.robot | 14 ++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 test/robot/keywords/git.robot create mode 100644 test/robot/suites/test_build_systemd.robot diff --git a/test/robot/keywords/git.robot b/test/robot/keywords/git.robot new file mode 100644 index 0000000..3340f17 --- /dev/null +++ b/test/robot/keywords/git.robot @@ -0,0 +1,18 @@ +*** Settings *** +Library Process + +*** Keywords *** +Checkout Repository + [Arguments] ${url} ${path} ${branch}=main + + ${result}= Run Process + ... git + ... clone + ... --depth + ... 1 + ... --branch + ... ${branch} + ... ${url} + ... ${path} + + Should Be Equal As Integers ${result.rc} 0 ${result.stderr} diff --git a/test/robot/suites/test_build_systemd.robot b/test/robot/suites/test_build_systemd.robot new file mode 100644 index 0000000..692478c --- /dev/null +++ b/test/robot/suites/test_build_systemd.robot @@ -0,0 +1,14 @@ +*** Settings *** +Library OperatingSystem +Resource ../keywords/git.robot + +Suite Teardown Remove Directory ${SYSTEMD_PATH} recursive=True + +*** Variables *** +${SYSTEMD_URL} https://salsa.debian.org/systemd-team/systemd.git +${SYSTEMD_PATH} ${TEMPDIR}/systemd +${SYSTEMD_BRANCH} debian/master + +*** Test Cases *** +Test + Checkout Repository ${SYSTEMD_URL} ${SYSTEMD_PATH} ${SYSTEMD_BRANCH} From 9f377e0043b07dfd21e40fd866a01e8c8b599a90 Mon Sep 17 00:00:00 2001 From: Thomas Willetal Date: Tue, 7 Jul 2026 18:43:27 +0200 Subject: [PATCH 3/9] build try --- .github/workflows/_robot-tests.yml | 14 +++++ .vscode/tasks.json | 8 +++ test/robot/keywords/aptly.robot | 11 ++++ test/robot/keywords/gpg.robot | 48 ++++++++++++++++ test/robot/suites/test_build_systemd.robot | 64 ++++++++++++++++++++-- 5 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 test/robot/keywords/aptly.robot create mode 100644 test/robot/keywords/gpg.robot diff --git a/.github/workflows/_robot-tests.yml b/.github/workflows/_robot-tests.yml index 384315e..7905f47 100644 --- a/.github/workflows/_robot-tests.yml +++ b/.github/workflows/_robot-tests.yml @@ -28,6 +28,20 @@ jobs: -u "${{ github.actor }}" \ --password-stdin + - name: Download runtime image (amd64) + uses: actions/download-artifact@v8 + with: + name: runtime-image-amd64 + + - name: Load runtime image + run: | + zstd -d runtime.tar.zst -o runtime.tar + podman load < runtime.tar + podman images + podman tag \ + ghcr.io/${{ github.repository }}:latest-amd64 \ + packtly-builder:latest + - name: Run Robot Framework tests run: ./test/robot/run.sh diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 18d15b8..02306a4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -13,6 +13,14 @@ "cwd": "${workspaceFolder}/packtly-builder/tooling" }, "problemMatcher": [] + }, + { + "label": "run robot tests", + "type": "shell", + "command": "${workspaceFolder}/test/robot/run.sh", + "problemMatcher": [ + "$python" + ] } ], "inputs": [ diff --git a/test/robot/keywords/aptly.robot b/test/robot/keywords/aptly.robot new file mode 100644 index 0000000..253005b --- /dev/null +++ b/test/robot/keywords/aptly.robot @@ -0,0 +1,11 @@ +*** Settings *** +Library OperatingSystem + +*** Keywords *** +Generate Aptly Credentials + [Arguments] + ... ${path} + ... ${username}=admin + ... ${password}=password + + Create File ${path} username=${username}\npassword=${password} diff --git a/test/robot/keywords/gpg.robot b/test/robot/keywords/gpg.robot new file mode 100644 index 0000000..74c339a --- /dev/null +++ b/test/robot/keywords/gpg.robot @@ -0,0 +1,48 @@ +*** Settings *** +Library Process +Library String +Library OperatingSystem + +*** Variables *** +${GEN_GPG_SCRIPT} ${EMPTY} + +*** Keywords *** +Get Gen GPG Script + ${result}= Run Process git rev-parse --show-toplevel + Should Be Equal As Integers ${result.rc} 0 ${result.stderr} + ${topdir}= Strip String ${result.stdout} + RETURN ${topdir}/packtly-builder/containers/scripts/gen_gpg + +Generate GPG Keys + [Arguments] + ... ${keys_dir} + ... ${image} + ... ${name}=packtly-test + ... ${email}=test@packtly.local + ... ${pass}=test1234 + + ${gpg_out}= Set Variable ${keys_dir}/_gpg_out + ${gen_gpg}= Get Gen GPG Script + + Create Directory ${keys_dir}/public + Create Directory ${keys_dir}/private + Create Directory ${gpg_out} + + ${result}= Run Process + ... podman run --rm + ... --entrypoint /usr/local/bin/gen_gpg + ... -v ${gen_gpg}:/usr/local/bin/gen_gpg:Z,ro + ... -v ${gpg_out}:/opt/keys/gpg:Z + ... ${image} + ... --name ${name} + ... --email ${email} + ... --pass ${pass} + ... stdout=PIPE stderr=PIPE + + Should Be Equal As Integers ${result.rc} 0 ${result.stderr} + + Move File ${gpg_out}/repo_signing.key ${keys_dir}/public/repo_signing.key + Move File ${gpg_out}/repo_signing_private.key ${keys_dir}/private/repo_signing_private.key + Move File ${gpg_out}/repo_signing_private_pass ${keys_dir}/private/repo_signing_private_pass + + Remove Directory ${gpg_out} recursive=True diff --git a/test/robot/suites/test_build_systemd.robot b/test/robot/suites/test_build_systemd.robot index 692478c..0c7db3e 100644 --- a/test/robot/suites/test_build_systemd.robot +++ b/test/robot/suites/test_build_systemd.robot @@ -1,14 +1,68 @@ *** Settings *** Library OperatingSystem +Library Process Resource ../keywords/git.robot +Resource ../keywords/gpg.robot +Resource ../keywords/aptly.robot -Suite Teardown Remove Directory ${SYSTEMD_PATH} recursive=True +Suite Setup Prepare Workspace +Suite Teardown Remove Directory ${WORKSPACE} recursive=True *** Variables *** -${SYSTEMD_URL} https://salsa.debian.org/systemd-team/systemd.git -${SYSTEMD_PATH} ${TEMPDIR}/systemd -${SYSTEMD_BRANCH} debian/master +${SYSTEMD_URL} https://salsa.debian.org/systemd-team/systemd.git +${SYSTEMD_BRANCH} debian/master +${CONTAINER_IMAGE} packtly-builder:latest +${APTLY_CREDENTIALS} ${EMPTY} +${WORKSPACE} ${EMPTY} +${KEYS_DIR} ${EMPTY} + +*** Keywords *** +Prepare Workspace + Set Suite Variable ${WORKSPACE} ${TEMPDIR}/systemd-build + Set Suite Variable ${KEYS_DIR} ${WORKSPACE}/keys + Set Suite Variable ${APTLY_CREDENTIALS} ${WORKSPACE}/aptly-credentials + Create Directory ${WORKSPACE} + Create Directory ${WORKSPACE}/logs + Generate GPG Keys ${KEYS_DIR} ${CONTAINER_IMAGE} + Generate Aptly Credentials ${APTLY_CREDENTIALS} + +Run Build + [Arguments] + ... ${workspace} + ... ${keys_dir} + ... ${aptly_credentials} + ... ${image} + ... ${dist}=trixie-apollo + ... ${component}=main + + ${result}= Run Process + ... podman run --rm + ... -v ${workspace}:/workspace:Z + ... -v ${keys_dir}/public/repo_signing.key:/opt/keys/gpg/repo_signing.key:Z,ro + ... -v ${keys_dir}/private/repo_signing_private.key:/opt/keys/gpg/repo_signing_private.key:Z,ro + ... -v ${keys_dir}/private/repo_signing_private_pass:/opt/keys/gpg/repo_signing_private_pass:Z,ro + ... -v ${aptly_credentials}:/run/secrets/aptly-credentials:Z,ro + ... -v ${workspace}/logs:/logs:Z + ... -e APTLYHOST=http://localhost:8080 + ... --tmpfs /run:exec,mode=0755 + ... --cap-add SYS_ADMIN + ... --cap-add SYS_PTRACE + ... --security-opt seccomp=unconfined + ... --security-opt unmask=all + ... --network=host + ... ${image} + ... /workspace/systemd + ... --log-file /logs/build.log + ... --dist ${dist} + ... --component ${component} + ... stdout=PIPE stderr=PIPE + *** Test Cases *** Test - Checkout Repository ${SYSTEMD_URL} ${SYSTEMD_PATH} ${SYSTEMD_BRANCH} + Checkout Repository ${SYSTEMD_URL} ${WORKSPACE}/systemd ${SYSTEMD_BRANCH} + Run Build + ... ${WORKSPACE} + ... ${KEYS_DIR} + ... ${APTLY_CREDENTIALS} + ... image=${CONTAINER_IMAGE} From 119b03623df9c1eefca2deb2a0e7e48d4a172e17 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 8 Jul 2026 08:14:25 +0200 Subject: [PATCH 4/9] try3 --- test/robot/suites/test_build_systemd.robot | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/robot/suites/test_build_systemd.robot b/test/robot/suites/test_build_systemd.robot index 0c7db3e..3738122 100644 --- a/test/robot/suites/test_build_systemd.robot +++ b/test/robot/suites/test_build_systemd.robot @@ -43,13 +43,13 @@ Run Build ... -v ${keys_dir}/private/repo_signing_private_pass:/opt/keys/gpg/repo_signing_private_pass:Z,ro ... -v ${aptly_credentials}:/run/secrets/aptly-credentials:Z,ro ... -v ${workspace}/logs:/logs:Z - ... -e APTLYHOST=http://localhost:8080 - ... --tmpfs /run:exec,mode=0755 + ... -e APTLYHOST\=http://localhost:8080 + ... --tmpfs /run:exec,mode\=0755 ... --cap-add SYS_ADMIN ... --cap-add SYS_PTRACE - ... --security-opt seccomp=unconfined - ... --security-opt unmask=all - ... --network=host + ... --security-opt seccomp\=unconfined + ... --security-opt unmask\=all + ... --network\=host ... ${image} ... /workspace/systemd ... --log-file /logs/build.log From 926747a02262ccc6e58a8cb1e66fbf6ab0ab85db Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 8 Jul 2026 12:34:12 +0200 Subject: [PATCH 5/9] try4 --- test/robot/suites/test_build_systemd.robot | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/robot/suites/test_build_systemd.robot b/test/robot/suites/test_build_systemd.robot index 3738122..1138062 100644 --- a/test/robot/suites/test_build_systemd.robot +++ b/test/robot/suites/test_build_systemd.robot @@ -57,6 +57,13 @@ Run Build ... --component ${component} ... stdout=PIPE stderr=PIPE + Log STDOUT:\n${result.stdout} + Log STDERR:\n${result.stderr} + Log File ${workspace}/logs/build.log + Should Be Equal As Integers ${result.rc} 0 + ... Build failed with rc ${result.rc}. See stdout/stderr and build.log above. + + *** Test Cases *** Test From 73b0b0297d7e758b44a1823e14732c7d06778196 Mon Sep 17 00:00:00 2001 From: Thomas Willetal Date: Wed, 8 Jul 2026 17:50:02 +0200 Subject: [PATCH 6/9] try4 --- .github/workflows/_robot-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/_robot-tests.yml b/.github/workflows/_robot-tests.yml index 7905f47..99a5fec 100644 --- a/.github/workflows/_robot-tests.yml +++ b/.github/workflows/_robot-tests.yml @@ -45,6 +45,10 @@ jobs: - name: Run Robot Framework tests run: ./test/robot/run.sh + - name: Fix step summary permissions for Robot Reporter + if: always() + run: chmod o+w "$GITHUB_STEP_SUMMARY" + - name: Robot Reporter if: always() uses: joonvena/robotframework-reporter-action@v2.5 From 15c2120ac4c50808b85e9f6265456f18b627ec43 Mon Sep 17 00:00:00 2001 From: Thomas Willetal Date: Thu, 9 Jul 2026 06:21:51 +0200 Subject: [PATCH 7/9] try5 --- test/robot/suites/test_build_systemd.robot | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/test/robot/suites/test_build_systemd.robot b/test/robot/suites/test_build_systemd.robot index 1138062..82dd2be 100644 --- a/test/robot/suites/test_build_systemd.robot +++ b/test/robot/suites/test_build_systemd.robot @@ -26,7 +26,7 @@ Prepare Workspace Generate GPG Keys ${KEYS_DIR} ${CONTAINER_IMAGE} Generate Aptly Credentials ${APTLY_CREDENTIALS} -Run Build +Run Systemd build [Arguments] ... ${workspace} ... ${keys_dir} @@ -44,31 +44,29 @@ Run Build ... -v ${aptly_credentials}:/run/secrets/aptly-credentials:Z,ro ... -v ${workspace}/logs:/logs:Z ... -e APTLYHOST\=http://localhost:8080 - ... --tmpfs /run:exec,mode\=0755 + ... -e DEB_BUILD_OPTIONS\=nocheck ... --cap-add SYS_ADMIN ... --cap-add SYS_PTRACE - ... --security-opt seccomp\=unconfined - ... --security-opt unmask\=all ... --network\=host ... ${image} ... /workspace/systemd ... --log-file /logs/build.log ... --dist ${dist} ... --component ${component} - ... stdout=PIPE stderr=PIPE - Log STDOUT:\n${result.stdout} - Log STDERR:\n${result.stderr} Log File ${workspace}/logs/build.log + Copy File ${workspace}/logs/build.log ${CURDIR}/../results/systemd_build.log Should Be Equal As Integers ${result.rc} 0 ... Build failed with rc ${result.rc}. See stdout/stderr and build.log above. *** Test Cases *** -Test +Test Systemd Build + [Documentation] Test building systemd package with packtly-builder + [Tags] systemd build Checkout Repository ${SYSTEMD_URL} ${WORKSPACE}/systemd ${SYSTEMD_BRANCH} - Run Build + Run Systemd build ... ${WORKSPACE} ... ${KEYS_DIR} ... ${APTLY_CREDENTIALS} From 70dcab48105c25f51f2de2eac261dc66022ec41f Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 9 Jul 2026 10:23:59 +0200 Subject: [PATCH 8/9] try6 --- .github/workflows/_robot-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_robot-tests.yml b/.github/workflows/_robot-tests.yml index 99a5fec..2d95f5f 100644 --- a/.github/workflows/_robot-tests.yml +++ b/.github/workflows/_robot-tests.yml @@ -50,7 +50,7 @@ jobs: run: chmod o+w "$GITHUB_STEP_SUMMARY" - name: Robot Reporter - if: always() + if: always() && github.event_name == 'pull_request' uses: joonvena/robotframework-reporter-action@v2.5 with: gh_access_token: ${{ secrets.GITHUB_TOKEN }} From e7235f1328deb5da1f23d856a8ecd215b624f234 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 9 Jul 2026 17:24:54 +0200 Subject: [PATCH 9/9] try7 --- test/robot/suites/test_build_systemd.robot | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/test/robot/suites/test_build_systemd.robot b/test/robot/suites/test_build_systemd.robot index 82dd2be..ff4cd6b 100644 --- a/test/robot/suites/test_build_systemd.robot +++ b/test/robot/suites/test_build_systemd.robot @@ -60,6 +60,31 @@ Run Systemd build ... Build failed with rc ${result.rc}. See stdout/stderr and build.log above. +Verify Build Artifacts + [Documentation] Verify a successful build produced valid .changes and .deb artifacts. + [Arguments] ${workspace} ${image} + + # A successful debuild leaves the .changes and .deb files in the workspace. + ${changes}= List Files In Directory ${workspace} *.changes absolute=True + Should Not Be Empty ${changes} No .changes file produced - build did not complete + ${debs}= List Files In Directory ${workspace} *.deb absolute=True + Should Not Be Empty ${debs} No .deb packages produced + + # Validate each .deb is a structurally valid Debian package. + FOR ${deb} IN @{debs} + ${info}= Run Process + ... podman run --rm + ... --entrypoint dpkg-deb + ... -v ${workspace}:/workspace:Z,ro + ... ${image} + ... --info /workspace/${deb.rsplit('/', 1)[1]} + ... stdout=PIPE stderr=PIPE + Log ${info.stdout} + Should Be Equal As Integers ${info.rc} 0 + ... dpkg-deb rejected ${deb}: ${info.stderr} + END + + *** Test Cases *** Test Systemd Build @@ -71,3 +96,4 @@ Test Systemd Build ... ${KEYS_DIR} ... ${APTLY_CREDENTIALS} ... image=${CONTAINER_IMAGE} + Verify Build Artifacts ${WORKSPACE} ${CONTAINER_IMAGE}