Skip to content

Run the wasm-jit library test in docker - #291

Merged
sjoelund merged 1 commit into
masterfrom
wasm-jit-docker
Aug 5, 2026
Merged

Run the wasm-jit library test in docker#291
sjoelund merged 1 commit into
masterfrom
wasm-jit-docker

Conversation

@sjoelund

@sjoelund sjoelund commented Aug 5, 2026

Copy link
Copy Markdown
Member

The wasm-jit target needs the Rust omc, which the test nodes run too old an Ubuntu to build. Build it in the image the OpenModelica job uses, and run test.py there as well: an omc built against that image's glibc does not run on the node. Everything using the node's own omc (installing the libraries, the reference files, the database and publishing) stays outside.

runRegressiontest takes the directory of a Dockerfile; when given, the checkout+build script and the test.py script run through .inside() instead of sh. The testing repository is checked out before the omc build, since it provides that Dockerfile.

The image adds what the test tool needs on top of the build deps:

Added Needed for
rsync, openssh-client publishing the results
time, psmisc time ./test.py, killall omc
venv from requirements joblib, monotonic, natsort, psutil, ...
omc (stable) --ompython_omhome, mos-file generation

The image's own venv only carries ompython and simplejson, and its apt sources point at the nightly component, so the sources list is switched to stable for a released reference omc.

Mounts: the node's home (the cached omc build, the libraries used as HOME during the run, the ssh key), /mnt/ReferenceFiles read-write since test.py caches a hash next to every reference file, /etc/passwd because ssh refuses to run for a uid it cannot look up, and the cargo registry volume of the OpenModelica job. --init reaps the omc processes test.py orphans.

sccache now starts inside the build script: a server started outside the container is of no use in it. Being the same image as the OpenModelica job also means its cache can hit at all, which it could not against a toolchain on the node, so the C parts get a compiler launcher too.

The wasm-jit target needs the Rust omc, which the test nodes run too old
an Ubuntu to build. Build it in the image the OpenModelica job uses, and
run test.py there as well: an omc built against that image's glibc does
not run on the node. Everything using the node's own omc (installing the
libraries, the reference files, the database and publishing) stays
outside.

`runRegressiontest` takes the directory of a Dockerfile; when given, the
checkout+build script and the test.py script run through `.inside()`
instead of `sh`. The testing repository is checked out before the omc
build, since it provides that Dockerfile.

The image adds what the test tool needs on top of the build deps:

| Added                    | Needed for                                |
|--------------------------|-------------------------------------------|
| rsync, openssh-client    | publishing the results                    |
| time, psmisc             | `time ./test.py`, `killall omc`           |
| venv from requirements   | joblib, monotonic, natsort, psutil, ...   |
| omc (stable)             | --ompython_omhome, mos-file generation    |

The image's own venv only carries ompython and simplejson, and its apt
sources point at the nightly component, so the sources list is switched
to stable for a released reference omc.

Mounts: the node's home (the cached omc build, the libraries used as
HOME during the run, the ssh key), /mnt/ReferenceFiles read-write since
test.py caches a hash next to every reference file, /etc/passwd because
ssh refuses to run for a uid it cannot look up, and the cargo registry
volume of the OpenModelica job. --init reaps the omc processes test.py
orphans.

sccache now starts inside the build script: a server started outside the
container is of no use in it. Being the same image as the OpenModelica
job also means its cache can hit at all, which it could not against a
toolchain on the node, so the C parts get a compiler launcher too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sjoelund
sjoelund enabled auto-merge (squash) August 5, 2026 06:15
@sjoelund
sjoelund merged commit 3ff0f28 into master Aug 5, 2026
7 checks passed
@sjoelund
sjoelund deleted the wasm-jit-docker branch August 5, 2026 06:31
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.

1 participant