diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5fb43f92..c3b91520 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -137,6 +137,8 @@ jobs: test: { name: "apertis", case: "apertis" } - backend: { name: "uml", backend: "--fakemachine-backend=uml" } test: { name: "partitioning", case: "partitioning" } + - backend: { name: "uml", backend: "--fakemachine-backend=uml" } + test: { name: "run", case: "run" } name: ${{matrix.test.name}} on ${{matrix.backend.name}} steps: - name: Repository checkout diff --git a/tests/run/scripts/test-broken-symlink.sh b/tests/run/scripts/test-broken-symlink.sh new file mode 120000 index 00000000..21840b82 --- /dev/null +++ b/tests/run/scripts/test-broken-symlink.sh @@ -0,0 +1 @@ +broken.sh \ No newline at end of file diff --git a/tests/run/scripts/test-no-exec-bit.sh b/tests/run/scripts/test-no-exec-bit.sh new file mode 100644 index 00000000..e69de29b diff --git a/tests/run/scripts/test-symlink.sh b/tests/run/scripts/test-symlink.sh new file mode 120000 index 00000000..61a58b02 --- /dev/null +++ b/tests/run/scripts/test-symlink.sh @@ -0,0 +1 @@ +test.sh \ No newline at end of file diff --git a/tests/run/scripts/test.sh b/tests/run/scripts/test.sh new file mode 100755 index 00000000..4bb639a8 --- /dev/null +++ b/tests/run/scripts/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +echo "test from script; arguments: $@" diff --git a/tests/run/test.yaml b/tests/run/test.yaml new file mode 100644 index 00000000..45baa54a --- /dev/null +++ b/tests/run/test.yaml @@ -0,0 +1,46 @@ +--- +architecture: amd64 + +actions: + - action: debootstrap + suite: bullseye + variant: minbase + merged-usr: true + + - action: run + description: Run a script which is a symlink + script: scripts/test-symlink.sh argument1 argument2 + + - action: run + description: Run a script with arguments + script: scripts/test.sh argument1 argument2 + + - action: run + description: Run a script without arguments + script: scripts/test.sh + + - action: run + description: Run a script with arguments in a chroot + chroot: true + script: scripts/test.sh argument1 argument2 + + - action: run + description: Run a script without arguments in chroot + chroot: true + script: scripts/test.sh + + - action: run + description: Test running a command + command: echo test + + # TODO: This should fail in the Verify stage, we cannot yet check that in CI + #- action: run + # description: Run a script which has a broken symlink + # chroot: true + # script: scripts/test-broken-symlink.sh + + # TODO: This should fail in the Verify stage, we cannot yet check that in CI + #- action: run + # description: Run a script which has no exec bit set + # chroot: true + # script: scripts/test-broken-symlink.sh