Skip to content
Elwardi edited this page Oct 12, 2025 · 3 revisions

When I run ./foamut (or ./Alltest) it says to source an OpenFOAM version!

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).

What's the difference between ./foamut and ./Alltest?

./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 --parallel for parallel tests)
  • New features: --standalone, --test-driver, --test-prefix, --report, --force-timeout
  • Catch2 args: Pass directly without special separators (e.g., ./foamut "[mytag]")

How do I run both serial and parallel tests?

In v2.0.0, you need to run two separate commands:

# Run serial tests
./foamut

# Run parallel tests
./foamut --parallel

Or in CI pipelines:

# Run all tests (serial + parallel)
./foamut && ./foamut --parallel

Can I run tests without OpenFOAM cases?

Yes! Use the --standalone flag:

./foamut --standalone

This 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.

How do I debug a failing test?

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-timeout

By default, timeout is disabled when using --test-prefix. Use --force-timeout to keep it.

Clone this wiki locally