Merge branch 'wip-tests' into wip-tests-build-refactor

Signed-off-by: Jacques de Laval <jacques@de-laval.se>
This commit is contained in:
Jacques de Laval committed 2021-02-24 18:48:26 +01:00
commit 1efdbeda16
28 files changed
+703 -221

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
set -eu
# shellcheck disable=SC2154
if [ ! -f "$srcdir"/../config.status ]; then
"$srcdir"/../configure --prefix=/
make
make DESTDIR="$(pwd)/test-root/" install
mkdir -p test-root/bin
cp "${srcdir}/test-root/bin/chrootsetup.sh" test-root/bin
cp "${srcdir}/test-root/busybox-x86_64.md5" test-root/
cp "${srcdir}/test-root/Makefile" test-root/
make -C test-root/
config_h='./config.h'
echo "export PATH=/bin:/sbin" > test.env
else
make -C ../ DESTDIR="$(pwd)/test-root/" install
FINITBIN=../../src/finit make -C test-root/
config_h='../config.h'
echo "export PATH=/bin:/sbin:$PREFIX/sbin:$PREFIX/bin" > test.env
fi
echo "export FINIT_CONF=$(grep FINIT_CONF $config_h | cut -d' ' -f3 | cut -d'"' -f2)" >> test.env
echo "export FINIT_RCSD=$(grep FINIT_RCSD $config_h | cut -d' ' -f3 | cut -d'"' -f2)" >> test.env