]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
ci: Fix fail due to existent build dir
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Sat, 30 Nov 2024 18:46:21 +0000 (12:46 -0600)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 6 Dec 2024 21:16:28 +0000 (13:16 -0800)
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 <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/262
.github/workflows/main.yml

index 3a9472f3497953bb6d5e20874a0201e2d95ec22f..d2f55ecf219335a076f46d76f0a758761ad33131 100644 (file)
@@ -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' }}