Skip to content

Commit 672aeb1

Browse files
committed
Test max on s390x (and potentially elsewhere supported)
This modifies the `cross` dockerfile and associated `justfile` recipes to install dependencies needed for testing beyond max-pure. This works when installing packages for the cross target is already working, which is the same scenario where the upgraded `git` (from the git-core PPA) is installed for the `cross` target. But unlike `git`, when testing max-pure it is not necessary to install these libraries. Yet the current approach does install them... but native builds of them. This is inefficient in the Android test where there may be no immediately forthcoming way to install appropriate `cross`-target builds of the libraries. This extra work should probably be eliminated. But the best way to do that will depend on whether the two cases of cross targets (those we can install packages for and those we cannot) remain only two cases, and whether a single `RUN` script continues to be used, versus splitting it (or creating multiple `cross` dockerfiles). This also gives the `cross-test` recipe a `*cargo-test-args` parameter, and moves `--no-default-features --features max-pure` out of `cross-test` and into the arguments `cross-test-android` passes to `cross-test` (causing `*cargo-test-args` to receive it). The reason for doing this rather than having a parameter that is put in place of `max-pure`, for which `cross-test-s390x` could pass `max`, is that it is not obvious that `--no-default-features` is free of undesired effects when `--workspace` is used: it seems like it may suppress some features of some tested `gix-*` crate projects that do not individually recognize `max`. (This differs from the situation with the journey tests, which test the `ein` and `gix` executables from by the `gitoxide` crate, which recognizes `max-pure`.) The intuitive effect of "testing max" is currently to run the entire test suite with all default features enabled, so this strives to do that. This still does not appear sufficient to produce the s390x test failures mentioned in GitoxideLabs#1687 and discused in GitoxideLabs#1698 comments, even though this is now running s390x tests with the same full default features as were used when those failures were observed.
1 parent 579a9ce commit 672aeb1

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

etc/docker/Dockerfile.test-cross

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ RUN set -uC && \
2424
apt-get purge --autoremove -y git && \
2525
apt-get install --no-install-recommends -y "libc6$apt_suffix" "libcurl3-gnutls$apt_suffix" \
2626
"libexpat1$apt_suffix" "libpcre2-8-0$apt_suffix" "zlib1g$apt_suffix" perl liberror-perl \
27-
git-man file jq patch && \
27+
git-man ca-certificates cmake "curl$apt_suffix" file jq "libc-dev$apt_suffix" \
28+
"libssl-dev$apt_suffix" patch pkgconf && \
2829
mkdir /tmp/dl && chown _apt /tmp/dl && \
2930
(cd /tmp/dl && apt-get download "git$apt_suffix") && \
3031
dpkg --ignore-depends="perl$apt_suffix,liberror-perl$apt_suffix" -i /tmp/dl/git[-_]*.deb && \

justfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,17 @@ cross-image target:
227227
- <etc/docker/Dockerfile.test-cross
228228

229229
# Test another platform with `cross`
230-
cross-test target: (cross-image target)
230+
cross-test target *cargo-test-args: (cross-image target)
231231
CROSS_CONFIG=etc/docker/test-cross.toml NO_PRELOAD_CXX=1 \
232-
cross test --workspace --no-fail-fast --target "{{ target }}" \
233-
--no-default-features --features max-pure \
234-
-- --skip realpath::fuzzed_timeout
232+
cross test --workspace --no-fail-fast --target {{ target }} \
233+
{{ cargo-test-args }} -- --skip realpath::fuzzed_timeout
235234

236235
# Test s390x with `cross`
237236
cross-test-s390x: (cross-test 's390x-unknown-linux-gnu')
238237

239-
# Test Android with `cross`
240-
cross-test-android: (cross-test 'armv7-linux-androideabi')
238+
# Test Android with `cross` (max-pure)
239+
cross-test-android: (cross-test 'armv7-linux-androideabi' \
240+
'--no-default-features' '--features' 'max-pure')
241241

242242
# Run cargo-diet on all crates to see that they are still in bound
243243
check-size:

0 commit comments

Comments
 (0)