debian-koji-osbuild/test/container/builder/run-kojid.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

22 lines
669 B
Bash
Executable file

#!/bin/bash
set -ux
if ls /share/rpms/*.rpm 1> /dev/null 2>&1; then
echo "Using RPMs"
rpm -i /share/rpms/koji-osbuild-?-0.*.rpm \
/share/rpms/koji-osbuild-builder-*.rpm
else
echo "Using local plugin"
cp /share/plugins/builder/osbuild.py /usr/lib/koji-builder-plugins/
fi
KOJI="koji --server=http://org.osbuild.koji.koji/kojihub --user=kojiadmin --password=kojipass --authtype=password"
$KOJI add-host org.osbuild.koji.kojid i386 x86_64
if [ $? -eq 0 ]; then
$KOJI add-host-to-channel org.osbuild.koji.kojid image
$KOJI add-host-to-channel org.osbuild.koji.kojid createrepo
fi
/usr/sbin/kojid -d -v -f --force-lock || cat /var/log/kojid.log