From: Lucas De Marchi Date: Sat, 30 Nov 2024 18:46:21 +0000 (-0600) Subject: ci: Fix fail due to existent build dir X-Git-Tag: v34~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa245759a0c3614cd104ec85863e9b772a2c003d;p=thirdparty%2Fkmod.git ci: Fix fail due to existent build dir The second check is a "should fail" check, but it will fail because the build dir already exists rather than for the true reason. Use a different dir for the configure tests and move the `rm` inside the function. Signed-off-by: Lucas De Marchi Reviewed-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/262 --- diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a9472f3..d2f55ecf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -74,14 +74,14 @@ jobs: if: ${{ matrix.build == 'meson' }} run: | should_fail() { - if meson setup "$@" build/; then + rm -rf build-setup-test/ + if meson setup "$@" build-setup-test/; then echo Command was expected to fail, but was successful return 1 fi } should_fail -D distconfdir=relative/ should_fail -D moduledir=relative/ - rm -rf build/ - name: configure (meson) if: ${{ matrix.build == 'meson' }}