74 Run one ExaParty run script from within its directory
77 Path of the run script relative to tests/exaparty.
79 We run the script through bash with pipefail, as most scripts pipe the
80 executable's output through tee, which otherwise hides a crash. python3
81 resolves to the interpreter that runs pytest, and src/ is added to the
82 PYTHONPATH, so the generator scripts find Peano's Python API.
85 pytest.skip(
"Peano is not built with --enable-particles --enable-exaparty")
86 script_path = TESTS_DIRECTORY / script
87 environment = dict(os.environ)
88 environment[
"PATH"] = (
89 str(Path(sys.executable).parent) + os.pathsep + environment.get(
"PATH",
"")
91 environment[
"PYTHONPATH"] = os.pathsep.join(
92 filter(
None, [str(PEANO_ROOT_DIRECTORY /
"src"), environment.get(
"PYTHONPATH")])
94 environment[
"MPLBACKEND"] =
"Agg"
95 result = subprocess.run(
96 [
"bash",
"-o",
"pipefail", script_path.name],
97 cwd=script_path.parent,
100 assert result.returncode == 0, f
"{script} failed with exit code {result.returncode}"
103@pytest.mark.integration
104@pytest.mark.parametrize("script", FUNCTIONAL_TESTS)