-
Notifications
You must be signed in to change notification settings - Fork 6
FAQ
- When I run
./foamut(or./Alltest) it says to source an OpenFOAM version! - What's the difference between
./foamutand./Alltest? - How do I run both serial and parallel tests?
- Can I run tests without OpenFOAM cases?
- How do I debug a failing test?
By the time you run ./foamut, you need to have an OpenFOAM installation sourced.
This can be done by sourcing the etc/bashrc file from your installation. There are
some examples
for popular OpenFOAM forks (yours might be different though, revise your installation
instructions).
./foamut is the main command (v2.0.0+) built with bashly.
./Alltest is a symlink to ./foamut for backward compatibility. They both execute the same script.
Key differences from v1.0.0:
-
Default behavior: v2.0.0 runs serial tests only (use
--parallelfor parallel tests) -
New features:
--standalone,--test-driver,--test-prefix,--report,--force-timeout -
Catch2 args: Pass directly without special separators (e.g.,
./foamut "[mytag]")
In v2.0.0, you need to run two separate commands:
# Run serial tests
./foamut
# Run parallel tests
./foamut --parallelOr in CI pipelines:
# Run all tests (serial + parallel)
./foamut && ./foamut --parallelYes! Use the --standalone flag:
./foamut --standaloneThis runs tests that are:
- Not tagged with any case name (e.g.,
[cavity]) - Tagged with
[serial]OR not tagged with[parallel]
Perfect for unit tests that don't need mesh or time objects.
Use --test-prefix with debugging tools:
# Debug with gdb
./foamut --test-prefix "gdb --args" "[failing-test]"
# Profile with valgrind
./foamut --test-prefix "valgrind" "[my-test]"
# Use custom profiler
./foamut --test-prefix "perf record" --force-timeoutBy default, timeout is disabled when using --test-prefix. Use --force-timeout to keep it.
“This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks.”
This is foamUT Wiki, here is a link back to Home