Skip to content
Snippets Groups Projects
Unverified Commit 0fd99aee authored by Oliver Smith's avatar Oliver Smith
Browse files

gitlab-ci.yml: more tests: install_pmbootstrap.sh

Add tests for:
* installing dependencies
* verifying that binfmt_misc works
* both code paths of add_remote_origin_original

Run install_pmbootstrap.sh with sh -ex, so it's easier to see where it
fails.
parent 58be8437
No related branches found
No related tags found
No related merge requests found
Pipeline #145144 passed
......@@ -27,8 +27,7 @@ install-pmbootstrap:
<<: *only-default
image: "alpine:latest"
script:
- "./install_pmbootstrap.sh"
- su pmos -c "pmbootstrap chroot -- echo 'hello world'"
- "test/install_pmbootstrap_test.sh"
mr-settings:
only:
......
#!/bin/sh -ex
# Run various code paths of install_pmbootstrap.sh
# Install pmbootstrap, with random dependencies
sh -ex ./install_pmbootstrap.sh tmux neovim
# Check if dependencies were installed
if ! apk info -vv | grep -q neovim; then
echo "ERROR: dependency was not installed with install_pmbootstrap.sh!"
exit 1
fi
# Run code with pmbootstrap
su pmos -c "pmbootstrap chroot -- echo 'hello world'"
# Make sure binfmt_misc works
su pmos -c "pmbootstrap chroot -baarch64 -- echo 'hello world'"
# Simulate running in already cloned pmaports.git dir
cp -r "$(su pmos -c 'pmbootstrap -q config aports')" /tmp/pmaports
cp install_pmbootstrap.sh /tmp/pmaports
cd /tmp/pmaports
# Run twice from pmaports.git, to trigger both code paths of
# add_remote_origin_original()
for _ in $(seq 1 2); do
sh -ex ./install_pmbootstrap.sh
su pmos -c "pmbootstrap chroot -- echo 'hello world'"
done
echo "done"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment