Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/ci/build-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ stage_and_write_provenance() {
build_musl_host() {
local -a docker_env=(
-e VITASDK_HOST_NAME="$host"
-e VITASDK_PROFILE="$profile"
-e VITASDK_SOURCE_REVISION="$revision"
-e VITASDK_SOURCE_DATE_EPOCH="$source_date_epoch"
-e CCACHE_DIR=/src/.ccache
Expand Down Expand Up @@ -284,7 +285,7 @@ build_musl_host() {
test -n "$STAGE1_DIR"
mkdir -p /src/build
cd /src/build
configure_args="-DVITASDK_STAGE1_DIR=$STAGE1_DIR -DVITASDK_SOURCE_REVISION=$VITASDK_SOURCE_REVISION -DVITASDK_SOURCE_DATE_EPOCH=$VITASDK_SOURCE_DATE_EPOCH -DVITASDK_HOST_NAME=$VITASDK_HOST_NAME"
configure_args="-DVITASDK_STAGE1_DIR=$STAGE1_DIR -DVITASDK_PROFILE=$VITASDK_PROFILE -DVITASDK_SOURCE_REVISION=$VITASDK_SOURCE_REVISION -DVITASDK_SOURCE_DATE_EPOCH=$VITASDK_SOURCE_DATE_EPOCH -DVITASDK_HOST_NAME=$VITASDK_HOST_NAME"
targets="tarball"
if [ -n "${VITASDK_PACKAGED_HOST:-}" ]; then
configure_args="$configure_args -DBUILD_PACMAN_CLIENT=ON -DVITASDK_PACKAGE_VERSION=$VITASDK_PACKAGE_VERSION -DVDPM_BUNDLE=$VDPM_BUNDLE -DVDPM_BUNDLE_SHA256=$VDPM_BUNDLE_SHA256"
Expand Down
21 changes: 21 additions & 0 deletions tests/ci/test-build-host-args.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,25 @@ grep -qx -- '-DVITASDK_PROFILE=vita-softfp' "$recorded" || {
}
rm -f "$fake_bin/cmake" "$recorded"

# 7. Every cmake that configures the tree is told which world it is building.
# There are three -- stage 1, the staged path, and the musl container, which
# builds its arguments as a string of its own -- and the profile reached two
# of them. The third produced a stage 2 whose version_info.txt said one world
# and whose makepkg.conf said the other, which validate-core-package.sh
# refused after an hour of building.
configuring=$(grep -cE '^[[:space:]]*(cmake |configure_args=|-S "\$repo_root")' \
"$repository_root/scripts/ci/build-host.sh" || true)
carrying=$(grep -c 'VITASDK_PROFILE' "$repository_root/scripts/ci/build-host.sh" || true)
if (( carrying < 4 )); then
printf 'not every cmake invocation carries the profile: %d mentions\n' "$carrying" >&2
exit 1
fi

# And the container has to be handed it, or the string above expands to
# nothing inside it.
grep -q -- '-e VITASDK_PROFILE=' "$repository_root/scripts/ci/build-host.sh" || {
printf 'the musl container is not given the profile\n' >&2
exit 1
}

printf 'build-host.sh argument contract tests passed\n'
Loading