From 11d0486324a84dc80f8a2e61fea230bbeefc8958 Mon Sep 17 00:00:00 2001 From: Ole Herman Schumacher Elgesem Date: Mon, 30 Mar 2026 23:41:21 +0200 Subject: [PATCH] Small improvements to bash test scripts Thanks for the suggestions @craigcomstock Signed-off-by: Ole Herman Schumacher Elgesem --- tests/run-format-tests.sh | 3 ++- tests/run-lint-tests.sh | 3 ++- tests/run-shell-tests.sh | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/run-format-tests.sh b/tests/run-format-tests.sh index f995e19..c57d40c 100644 --- a/tests/run-format-tests.sh +++ b/tests/run-format-tests.sh @@ -8,12 +8,13 @@ echo "TODO: Uncomment set -e to make tests start failing" echo "These tests expect cfengine CLI to be installed globally or in venv" echo "Looking for CFEngine CLI:" -which cfengine +cfengine --version echo "Check that input and expected files exist:" ls -al tests/format/*.input.cf ls -al tests/format/*.expected.cf +rm -rf tmp mkdir -p tmp echo "Check that input files match expected files:" diff --git a/tests/run-lint-tests.sh b/tests/run-lint-tests.sh index ced0b37..bf4deb4 100644 --- a/tests/run-lint-tests.sh +++ b/tests/run-lint-tests.sh @@ -6,11 +6,12 @@ set -e echo "These tests expect cfengine CLI to be installed globally or in venv" echo "Looking for CFEngine CLI:" -which cfengine +cfengine --version echo "Check that test files are in expected location:" ls -al tests/lint/*.cf +rm -rf tmp mkdir -p tmp echo "Run lint tests:" diff --git a/tests/run-shell-tests.sh b/tests/run-shell-tests.sh index cb3740d..5096cd3 100644 --- a/tests/run-shell-tests.sh +++ b/tests/run-shell-tests.sh @@ -6,12 +6,13 @@ set -e echo "These tests expect cfengine CLI to be installed globally or in venv" echo "Looking for CFEngine CLI:" -which cfengine +cfengine --version echo "Check that test files are in expected location:" ls -al tests/shell/*.sh ls -al tests/shell/00*.sh +rm -rf tmp mkdir -p tmp echo "Run shell tests:"