From 1a5600c79cd7c586ef4d98abfd010e016dbff7be Mon Sep 17 00:00:00 2001 From: Pegasust Date: Thu, 16 Jun 2022 16:28:05 -0700 Subject: [PATCH] test listaddons: Make pass on Cygwin If a custom action cannot be made non-executable, it needs to be removed as well (and the test skipped); otherwise its existence will break following tests that assume it's inactive. --- tests/t8010-listaddons.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/t8010-listaddons.sh b/tests/t8010-listaddons.sh index b4e89aa..cf212e8 100755 --- a/tests/t8010-listaddons.sh +++ b/tests/t8010-listaddons.sh @@ -30,9 +30,11 @@ EOF chmod -x .todo.actions.d/foo # On Cygwin, clearing the executable flag may have no effect, as the Windows ACL -# may still grant execution rights. In this case, we skip the test. +# may still grant execution rights. In this case, we skip the test, and remove +# the (still valid) custom action so that it doesn't break following tests. if [ -x .todo.actions.d/foo ]; then SKIP_TESTS="${SKIP_TESTS}${SKIP_TESTS+ }t8010.4" + rm .todo.actions.d/foo fi test_todo_session 'nonexecutable action' <>> todo.sh listaddons @@ -69,9 +71,11 @@ EOF # nthorne: shamelessly stolen from above.. chmod -x .todo.actions.d/norris/norris # On Cygwin, clearing the executable flag may have no effect, as the Windows ACL -# may still grant execution rights. In this case, we skip the test. +# may still grant execution rights. In this case, we skip the test, and remove +# the (still valid) custom action so that it doesn't break following tests. if [ -x .todo.actions.d/norris/norris ]; then SKIP_TESTS="${SKIP_TESTS}${SKIP_TESTS+ }t8010.8" + rm .todo.actions.d/norris/norris fi test_todo_session 'nonexecutable action in subfolder' <>> todo.sh listaddons