Repository navigation
Conversation
23c2ca4 to
9371940
Compare
|
Bummer: https://github.com/containers/bubblewrap/releases |
9371940 to
8c7197e
Compare
|
It is still a useful tool for running the tests on the local dev machine. Once CI is upgraded we can at least run trixie and sid on parallel tests. |
|
When you propagate To easily add extra options, you may want to make a list of bwrap options like: BWRAPOPTS=(
"--ro-bind" "/" "/"
"--dev" "/dev"
"--tmpfs" "/tmp"
"--tmpfs" "/var/tmp"
"--overlay-src" "$HOME" "--tmp-overlay" "$HOME"
"--overlay-src" "$TOPDIR" "--tmp-overlay" "$TOPDIR"
"--bind" "$TOPDIR/tests" "$TOPDIR/tests"
"--unshare-ipc"
"--unshare-pid"
"--unshare-net"
"--proc" "/proc"
"--die-with-parent"
)
...
CMD="bwrap ${BWRAPOPTS[*]} -- scripts/runtests ${WORKER_OPT[*]} -w {}" |
8c7197e to
35da1e4
Compare
Might be there are options... Backports, i could manually create overlays. Or just build the new bwrap in ci... ;-) As long as one job takes longer, the whole CI run stays constant. |
| c) CLEAN_ONLY=1; WORKER_OPT+=(-c) ;; | ||
| n) NOCLEAN=1 ; WORKER_OPT+=(-n) ;; | ||
| u) NOSUDO=true; WORKER_OPT+=(-u) ;; | ||
| v) VERBOSE=1; WORKER_OPT+=(-v) ;; | ||
| s) STOP=1; WORKER_OPT+=(-s) ;; | ||
| p) PRINT=1; WORKER_OPT+=(-p) ;; | ||
| d) export ENABLE_CRASHDUMPS=1; WORKER_OPT+=(-d) ;; |
There was a problem hiding this comment.
Propagating -c does not make sense. It is resolved immediately below.
Propagating -s does not make sense because each test runs as a singular instance that always stops. However, parallel can be instructed to stop processing files when one process fails. That is where this option should be redirected to.
Propagating -d probably requires extra bwrap options to ensure the crash dump is accessible.
This option binds the whole test folder, so the results are directly written to the host's filesystem:
Thanks, looks better. |
That is a problem. Running parallel tests may have side effects. Some tests share files that are not meant to be accessed/changed in parallel. |
This solves an issue with po4a that does not translates all the documents. However, some build jobs fail now and will be fixed in the following commits.
cppcheck passes now. Replace #ifdef AAAAA with #if 0 so cppcheck does not check unused code. "make headers" before cppckeck, so include is populated.
clang needs -latomic: See https://en.cppreference.com/cpp/atomic/atomic Quote: On GCC and Clang, some of the functionality described here requires linking against -latomic.
Hmm, are you sure? Each test is in a separate folder and I guess it should not write files in an other folder. I could bind a temporary folder for each test, copy all content in and at the end, copy the results together. But this would be cumbersome. Might be there is an overlay option to do something similar, just more efficient. |
This allows to run tests in parallel using bwarp for isolation of the linuxcnc processes
35da1e4 to
2e6f540
Compare
Yes, some tests share stuff. Most often they are in a sub-subdirectory of tests. For example, there are written variable files or intermediaries. The only two files we know of that should move out of the overlay are |
Do you have an example of such a test? For the gui tests, there are also some images needed. I need to see how to move files out of overlays with bwrap. Just rebased on top of #4477 to see how well it works but in CI, some tests fail. And in CI+Docker, there are still permission issues. Any clue where: But 14min down to 1m45 would be quite an improvement. In CI, doc's are anyway the longest running process, so it would not decrease the overall runtime, just the worker usage. Locally, it would be nice anyway. |
This adds a parallel execution mode for runtests and uses it in CI.
The linuxcnc instances are isolated using bwrap, so this works without #2722
Solves: #4588
Additionally, I fixed the issue that ctrl-c did not work with runtests.
ToDo:
TBD if an issue:
--keep-orderwould allow to keep the order. However:parallel: Warning: No more file handles.with many threads