From a72a31980d43e3463db45bef9f1d47654065678e Mon Sep 17 00:00:00 2001 From: Alex Pyrgiotis Date: Mon, 31 Jul 2023 20:47:29 +0300 Subject: [PATCH] Run GUI tests on separate processes Run our GUI tests on separate processes, because the combination of Ubuntu Focal, Qt5, PySide6, and pytest-qt somehow leads to segfaults, probably due to stale global state. Closes #493 --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 87636b4..c290cd1 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,11 @@ lint-apply: lint-black-apply lint-isort-apply ## apply all the linter's suggesti .PHONY: test test: - pytest -v --cov --ignore dev_scripts + # Make each GUI test run as a separate process, to avoid segfaults due to + # shared state. + # See more in https://github.com/freedomofpress/dangerzone/issues/493 + pytest --co -q tests/gui | grep -v ' collected' | xargs -n 1 pytest -v + pytest -v --cov --ignore dev_scripts --ignore tests/gui # Makefile self-help borrowed from the securedrop-client project