From 19d3b9e3df6f080b03a5efcc9ad58d2f10584516 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 7 Jan 2023 09:24:24 +0200 Subject: [PATCH 34/34] Split list of rulesets to test Rename ruleset_list.txt as ruleset_list_dist.txt, and list only rulesets shipped in the tarball there. Create new ruleset_list_opt.txt listing rulesets that might not be present, and which are tested only when they are. See osdn #45546 Signed-off-by: Marko Lindqvist --- tests/Makefile.am | 3 ++- .../{ruleset_list.txt => ruleset_list_dist.txt} | 3 --- tests/rs_test_res/ruleset_list_opt.txt | 3 +++ tests/rs_test_res/upgrade_ruleset_sync.bash | 4 ++-- tests/rulesets_autohelp.sh.in | 8 +++++++- tests/rulesets_not_broken.sh.in | 8 +++++++- tests/rulesets_save.sh.in | 8 +++++++- 7 files changed, 28 insertions(+), 9 deletions(-) rename tests/rs_test_res/{ruleset_list.txt => ruleset_list_dist.txt} (59%) create mode 100644 tests/rs_test_res/ruleset_list_opt.txt diff --git a/tests/Makefile.am b/tests/Makefile.am index 2d0affa246..fe0a8f9186 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,7 +25,8 @@ EXTRA_DIST = check_macros.sh \ rulesets_save.sh.in \ rulesets_upgrade.sh.in \ rs_test_res/ruleset_is.lua \ - rs_test_res/ruleset_list.txt \ + rs_test_res/ruleset_list_dist.txt \ + rs_test_res/ruleset_list_opt.txt \ rs_test_res/ruleset_loads.sh.in \ rulesets_autohelp.sh.in \ va_list.sh diff --git a/tests/rs_test_res/ruleset_list.txt b/tests/rs_test_res/ruleset_list_dist.txt similarity index 59% rename from tests/rs_test_res/ruleset_list.txt rename to tests/rs_test_res/ruleset_list_dist.txt index ef70db0a90..a4264f2033 100644 --- a/tests/rs_test_res/ruleset_list.txt +++ b/tests/rs_test_res/ruleset_list_dist.txt @@ -3,9 +3,6 @@ civ1 civ2 civ2civ3 classic -experimental multiplayer sandbox stub -webperimental -granularity diff --git a/tests/rs_test_res/ruleset_list_opt.txt b/tests/rs_test_res/ruleset_list_opt.txt new file mode 100644 index 0000000000..2080a32a83 --- /dev/null +++ b/tests/rs_test_res/ruleset_list_opt.txt @@ -0,0 +1,3 @@ +experimental +webperimental +granularity diff --git a/tests/rs_test_res/upgrade_ruleset_sync.bash b/tests/rs_test_res/upgrade_ruleset_sync.bash index ceeb657d99..27c4e6698b 100755 --- a/tests/rs_test_res/upgrade_ruleset_sync.bash +++ b/tests/rs_test_res/upgrade_ruleset_sync.bash @@ -10,8 +10,8 @@ set -e cd $(dirname $0) -# list of rulesets to copy -rulesets=`cat ruleset_list.txt` +# List of rulesets to copy +rulesets="$(cat ruleset_list_dist.txt) $(cat ruleset_list_opt.txt)" if test "x$1" = "x" ; then REVISION=$DEFAULT_REVISION diff --git a/tests/rulesets_autohelp.sh.in b/tests/rulesets_autohelp.sh.in index c9f8e3e56a..7241e0aae9 100644 --- a/tests/rulesets_autohelp.sh.in +++ b/tests/rulesets_autohelp.sh.in @@ -7,7 +7,13 @@ if test x$1 = x ; then # Try to load all rulesets that are developed with Freeciv - rulesets=`cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list.txt` + rulesets="$(cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list_dist.txt)" + optional="$(cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list_opt.txt)" + for opt in $optional ; do + if test -d "@abs_top_srcdir@/data/$opt" ; then + rulesets="$rulesets $opt" + fi + done else # Try to load the specified ruleset(s) rulesets=$@ diff --git a/tests/rulesets_not_broken.sh.in b/tests/rulesets_not_broken.sh.in index 5c97768210..f75de7f646 100644 --- a/tests/rulesets_not_broken.sh.in +++ b/tests/rulesets_not_broken.sh.in @@ -7,7 +7,13 @@ if test x$1 = x ; then # Try to load all rulesets that are developed with Freeciv - rulesets=`cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list.txt` + rulesets="$(cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list_dist.txt)" + optional="$(cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list_opt.txt)" + for opt in $optional ; do + if test -d "@abs_top_srcdir@/data/$opt" ; then + rulesets="$rulesets $opt" + fi + done else # Try to load the specified ruleset(s) rulesets=$@ diff --git a/tests/rulesets_save.sh.in b/tests/rulesets_save.sh.in index 1290e5d0ee..35ee4cc33d 100644 --- a/tests/rulesets_save.sh.in +++ b/tests/rulesets_save.sh.in @@ -9,7 +9,13 @@ if test x$1 = x ; then # Try to save all rulesets that are developed with Freeciv - rulesets=`cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list.txt` + rulesets="$(cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list_dist.txt)" + optional="$(cat @abs_top_srcdir@/tests/rs_test_res/ruleset_list_opt.txt)" + for opt in $optional ; do + if test -d "@abs_top_srcdir@/data/$opt" ; then + rulesets="$rulesets $opt" + fi + done else # Try to save the specified ruleset(s) rulesets=$@ -- 2.39.0