From a9a95b10942e584a94986dabc8a2d9bf9e82281c Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 7 Jan 2023 09:17:41 +0200 Subject: [PATCH 49/49] 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} (62%) create mode 100644 tests/rs_test_res/ruleset_list_opt.txt diff --git a/tests/Makefile.am b/tests/Makefile.am index aab13afdd8..ad8c8a9d28 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -26,7 +26,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 \ trailing_spaces.sh \ diff --git a/tests/rs_test_res/ruleset_list.txt b/tests/rs_test_res/ruleset_list_dist.txt similarity index 62% rename from tests/rs_test_res/ruleset_list.txt rename to tests/rs_test_res/ruleset_list_dist.txt index 8a3728e0e2..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 -goldkeep 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..e7bacdef85 --- /dev/null +++ b/tests/rs_test_res/ruleset_list_opt.txt @@ -0,0 +1,3 @@ +goldkeep +webperimental +granularity diff --git a/tests/rs_test_res/upgrade_ruleset_sync.bash b/tests/rs_test_res/upgrade_ruleset_sync.bash index 72e34de0a3..53ae958b87 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 f423c3ec66..2ad63f9375 100644 --- a/tests/rulesets_autohelp.sh.in +++ b/tests/rulesets_autohelp.sh.in @@ -7,7 +7,13 @@ 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` + 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 34c7681e61..aa404027d6 100644 --- a/tests/rulesets_not_broken.sh.in +++ b/tests/rulesets_not_broken.sh.in @@ -7,7 +7,13 @@ 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` + 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 d2e7831538..a8eb418705 100644 --- a/tests/rulesets_save.sh.in +++ b/tests/rulesets_save.sh.in @@ -9,7 +9,13 @@ 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` + 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