Skip to content

Add instructions for local testing with s390x#530

Open
leonm1 wants to merge 1 commit intoproxy-wasm:mainfrom
leonm1:docs/s390x
Open

Add instructions for local testing with s390x#530
leonm1 wants to merge 1 commit intoproxy-wasm:mainfrom
leonm1:docs/s390x

Conversation

@leonm1
Copy link
Contributor

@leonm1 leonm1 commented Mar 18, 2026

No description provided.

Signed-off-by: Matt Leon <mattleon@google.com>
docker run --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/s390x --interactive -t --env PS1="docker (s390x):" ghcr.io/proxy-wasm/build-tools:ubuntu-24.04-bazel-7.7.1 bash

# Set a useful prompt to remind yourself this shell is in s390x:
export PS1='docker@s390x:\[\033[01;34m\]\w\[\033[00m\] )> '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're already configuring PS1 in the docker invocation.

Comment on lines +17 to +30
```bash
bazel build --verbose_failures --test_output=errors --config=clang --config=hermetic-llvm -c opt $(bazel query 'kind(was.*_rust_binary, //test/test_data/...)') $(bazel query 'kind(_optimized_wasm_cc_binary, //test/test_data/...)')

# Copy the built artifacts to the test_data dir.
cp bazel-bin/test/test_data/*.wasm test/test_data/

# Rewrite test/test_data/BUILD to use the pre-built wasm module artifacts
echo "package(default_visibility = [\"//visibility:public\"])" > test/test_data/BUILD
for i in $(cd test/test_data && ls -1 *.wasm | sed 's/\.wasm$//g'); do \
echo "filegroup(name = \"$i\", srcs = [\"$i.wasm\"])" >> test/test_data/BUILD; \
done
# Rewrite test/BUILD to use the pre-built artifacts
sed 's/\.wasm//g' test/BUILD > test/BUILD.tmp && mv test/BUILD.tmp test/BUILD
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a bit error prone and repeated here and in the CI, perhaps extract this to a script?

Alternatively, maybe we should fix building test data on S390x? Rust modules should just work, since we're building Wasmtime, and we could either check if Emscripten supports S390x or perhaps skip tests using C++ SDK when testing locally?

Comment on lines +32 to +34
s390x tests can be run locally using the build-tools docker images published in
this repo. An s390x QEMU emulator is required to be installed ([example
instructions](https://docs.gitlab.com/omnibus/development/s390x/#vm-provisioning)).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just include those 2 lines here instead of linking?

s390x tests can be run locally using the build-tools docker images published in
this repo. An s390x QEMU emulator is required to be installed ([example
instructions](https://docs.gitlab.com/omnibus/development/s390x/#vm-provisioning)).
The following command will start an interactive session in an emulated s390x
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: missing separation between paragraphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants