From fa245759a0c3614cd104ec85863e9b772a2c003d Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sat, 30 Nov 2024 12:46:21 -0600 Subject: [PATCH] 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 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' }} -- 2.47.2