debian-koji-osbuild/test/build-container.sh
Lars Karlitski 16f762c2ed test: move to koji-osbuild-tests package
This is similar to how other osbuild packages are testing: everything
that's needed for testing is included in the tests package or a
dependency of it. The test runner then runs every executable in
/usr/libexec/tests/<packagename>. This gives a simple test API to
projects depending on this package (notably osbuild-composer).

The local development workflow described in HACKING.md is meant to
continue to work. To ensure this, all relevant scripts gained a
TEST_DATA variable, which defaults to `./test`, but is set from $1 to
the installed path from integration.sh.
2020-11-19 09:28:28 +01:00

20 lines
398 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
TEST_PATH=${1:-test}
# this script must be run as root
if [ $UID != 0 ]; then
echo This script must be run as root.
exit 1
fi
source /etc/os-release
podman build \
-t koji.hub \
-f ${TEST_PATH}/container/hub/Dockerfile.${ID} $TEST_PATH
podman build -t \
koji.builder \
-f ${TEST_PATH}/container/builder/Dockerfile.${ID} $TEST_PATH