From 940b1a83e2a67de4a8fe61227a92bdbedeeae8b2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 8 Oct 2022 16:51:33 +0300 Subject: [PATCH 48/48] Remove x-prefixing from ruleset testing shell scripts See osdn #45807 Signed-off-by: Marko Lindqvist --- tests/rulesets_autohelp.sh.in | 5 +++-- tests/rulesets_not_broken.sh.in | 3 ++- tests/rulesets_save.sh.in | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/rulesets_autohelp.sh.in b/tests/rulesets_autohelp.sh.in index c9f8e3e56a..f423c3ec66 100644 --- a/tests/rulesets_autohelp.sh.in +++ b/tests/rulesets_autohelp.sh.in @@ -5,7 +5,7 @@ # each ruleset that is developed with Freeciv, are able to automatically # generate help texts. Exits with 1 if autohelp fails for any ruleset. -if test x$1 = x ; then +if test "$1" = "" ; then # Try to load all rulesets that are developed with Freeciv rulesets=`cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list.txt` else @@ -13,7 +13,7 @@ else rulesets=$@ fi -if test "x$FREECIV_DATA_PATH" = "x" ; then +if test "$FREECIV_DATA_PATH" = "" ; then FREECIV_DATA_PATH=".@HOST_PATH_SEPARATOR@data" fi FREECIV_DATA_PATH="${FREECIV_DATA_PATH}@HOST_PATH_SEPARATOR@@top_builddir@@HOST_DIR_SEPARATOR@data@HOST_PATH_SEPARATOR@@top_srcdir@@HOST_DIR_SEPARATOR@data" @@ -25,4 +25,5 @@ for ruleset in $rulesets; do done echo "The automatic help text generation works for all tested rulesets." + exit 0 diff --git a/tests/rulesets_not_broken.sh.in b/tests/rulesets_not_broken.sh.in index 5c97768210..34c7681e61 100644 --- a/tests/rulesets_not_broken.sh.in +++ b/tests/rulesets_not_broken.sh.in @@ -5,7 +5,7 @@ # each ruleset that is developed with Freeciv, are able to load. Exits with # 1 if any ruleset fails to load. -if test x$1 = x ; then +if test "$1" = "" ; then # Try to load all rulesets that are developed with Freeciv rulesets=`cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list.txt` else @@ -19,4 +19,5 @@ for ruleset in $rulesets; do done echo "No broken rulesets detected." + exit 0 diff --git a/tests/rulesets_save.sh.in b/tests/rulesets_save.sh.in index 1290e5d0ee..d2e7831538 100644 --- a/tests/rulesets_save.sh.in +++ b/tests/rulesets_save.sh.in @@ -7,7 +7,7 @@ # If KEEP_RESULT_IN_DIR is set to a folder the saved result will be kept # there for later inspection even if nothing fails. -if test x$1 = x ; then +if test "$1" = "" ; then # Try to save all rulesets that are developed with Freeciv rulesets=`cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list.txt` else @@ -15,7 +15,7 @@ else rulesets=$@ fi -if test x$KEEP_RESULT_IN_DIR = x ; then +if test "$KEEP_RESULT_IN_DIR" = "" ; then # Put upgrade results in a temporary folder. tmpdir=`mktemp -d` else @@ -65,10 +65,11 @@ for ruleset in $rulesets; do fi done -if test x$KEEP_RESULT_IN_DIR = x ; then +if test "$KEEP_RESULT_IN_DIR" = "" ; then # Should not be kept rm -rf "${tmpdir}" fi echo "No resaving problems detected." + exit 0 -- 2.35.1