osi-tools/runtests

39 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-08-06 00:09:42 +00:00
#!/usr/bin/env bash
2018-08-06 01:49:45 +00:00
# 2018 Luke Shumaker
2018-08-06 00:09:42 +00:00
{
set -euE
COMMIT="${1:-systemd/master}"
workdir=$PWD/workdir
mkdir -p -- "$workdir"
gitget bare https://git.parabola.nu/~lukeshu/systemd.git "$workdir/systemd.git"
2018-08-06 01:56:44 +00:00
./osi-mk \
2018-08-09 21:38:54 +00:00
--size=5G \
2018-08-06 01:49:45 +00:00
--package='base' \
2018-08-06 04:02:37 +00:00
--module=osi-mk.d/libretools.sh \
2018-08-09 21:38:54 +00:00
--module=osi-mk.d/builddeps.sh \
2018-08-06 04:02:37 +00:00
--module=osi-mk.d/systemd-dhcpcd.sh \
2018-08-06 01:56:44 +00:00
--module=osi-mk.d/systemd-osi-run.sh \
--directory="$workdir/systemd.git:/home/testuser/packages/srcdest/systemd" \
--directory="abs/systemd-232:/home/testuser/packages/abs/systemd-232" \
--directory="abs/systemd:/home/testuser/packages/abs/systemd" \
2018-08-06 00:09:42 +00:00
"${workdir}/build.raw"
2018-08-06 01:56:44 +00:00
./osi-run "${workdir}/build.raw" <<-EOF
2018-08-06 00:09:42 +00:00
#!/usr/bin/env bash
2018-08-06 04:02:37 +00:00
withtty() {
local cmd
printf -v cmd '%q ' "\$@"
script --return --quiet --command "\$cmd" /dev/null
}
2018-08-06 00:09:42 +00:00
set -ex
2018-08-06 04:02:37 +00:00
2018-08-06 00:09:42 +00:00
cd ~/packages/abs/systemd-232
2018-08-09 21:38:54 +00:00
withtty sudo libremakepkg -l sd232
2018-08-06 00:09:42 +00:00
cd ~/packages/abs/systemd
2018-08-09 22:45:36 +00:00
sed 's:@COMMIT@:${COMMIT}:' < PKGBUILD.in > PKGBUILD
2018-08-09 21:38:54 +00:00
withtty sudo libremakepkg -l sd
2018-08-06 00:09:42 +00:00
EOF
2018-08-09 21:38:54 +00:00
2018-08-06 00:09:42 +00:00
}