Skip to content

Commit f445ce1

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 0f59f20 commit f445ce1

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

etc/docker/Dockerfile.test-cross

Lines changed: 2 additions & 1 deletion
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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,17 @@ cross-image target:
233233
- <etc/docker/Dockerfile.test-cross
234234

235235
# Test another platform with `cross`
236-
cross-test target: (cross-image target)
236+
cross-test target *cargo-test-args: (cross-image target)
237237
CROSS_CONFIG=etc/docker/test-cross.toml NO_PRELOAD_CXX=1 \
238-
cross test --workspace --no-fail-fast --target "{{ target }}" \
239-
--no-default-features --features max-pure \
240-
-- --skip realpath::fuzzed_timeout
238+
cross test --workspace --no-fail-fast --target {{ target }} \
239+
{{ cargo-test-args }} -- --skip realpath::fuzzed_timeout
241240

242241
# Test s390x with `cross`
243242
cross-test-s390x: (cross-test 's390x-unknown-linux-gnu')
244243

245-
# Test Android with `cross`
246-
cross-test-android: (cross-test 'armv7-linux-androideabi')
244+
# Test Android with `cross` (max-pure)
245+
cross-test-android: (cross-test 'armv7-linux-androideabi' \
246+
'--no-default-features' '--features' 'max-pure')
247247

248248
# Run `cargo diet` on all crates to see that they are still in bounds
249249
check-size:

0 commit comments

Comments
 (0)