From f296dc62e57c137c7ce72787ed2395e32d1f3ebc Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Sun, 26 Feb 2023 19:47:31 +0100 Subject: [PATCH] ci/pytest.sh: check if pmaports dir is clean Verify that the pmaports dir is clean before starting the testsuite, as some tests will fail if it is not. It's annoying when this is the reason that you have to restart the testsuite run after it already spent some time, so rather check for it beforehand. Ideally the testsuite wouldn't depend on the state of pmaports, see issue 2105 for that. Reviewed-by: Clayton Craft Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20230226184731.6989-1-ollieparanoid@postmarketos.org%3E --- .ci/pytest.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.ci/pytest.sh b/.ci/pytest.sh index a7b7872e..c29cd882 100755 --- a/.ci/pytest.sh +++ b/.ci/pytest.sh @@ -54,6 +54,12 @@ if ! [ -e "$deviceinfo" ]; then exit 1 fi +# Make sure pmaports is clean, some of the tests will fail otherwise +if [ -n "$(git -C "$pmaports" status --porcelain)" ]; then + echo "ERROR: pmaports dir is not clean" + exit 1 +fi + echo "Running pytest..." echo "NOTE: use 'pmbootstrap log' to see the detailed log if running locally." pytest \