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
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' }}