Feature #1532 ยป 0082-Drop-rulesets_not_broken.sh.in.patch
configure.ac | ||
---|---|---|
if test "x$ruledit" = "xyes" ; then
|
||
AC_CONFIG_FILES([fcruledit:bootstrap/fcruledit.in], [chmod +x fcruledit])
|
||
fi
|
||
AC_CONFIG_FILES([tests/rulesets_not_broken.sh],
|
||
[chmod +x tests/rulesets_not_broken.sh])
|
||
AC_CONFIG_FILES([tests/rulesets_save.sh],
|
||
[chmod +x tests/rulesets_save.sh])
|
||
AC_CONFIG_FILES([tests/rulesets_upgrade.sh],
|
tests/.gitignore | ||
---|---|---|
/Makefile.in
|
||
/check-output
|
||
/rulesets_not_broken.sh
|
||
/rulesets_save.sh
|
||
/rulesets_upgrade.sh
|
||
/rulesets_autohelp.sh
|
tests/Makefile.am | ||
---|---|---|
generate_rs_not_broken.sh \
|
||
generate_rs_save.sh \
|
||
header_guard.sh \
|
||
rulesets_not_broken.sh.in \
|
||
rulesets_save.sh.in \
|
||
rulesets_upgrade.sh.in \
|
||
rs_test_res/ruleset_is.lua \
|
tests/rulesets_not_broken.sh.in | ||
---|---|---|
#!/usr/bin/env bash
|
||
#/***********************************************************************
|
||
# Freeciv - Copyright (C) 2017-2023
|
||
# This program is free software; you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License as published by
|
||
# the Free Software Foundation; either version 2, or (at your option)
|
||
# any later version.
|
||
#
|
||
# This program is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
# GNU General Public License for more details.
|
||
#
|
||
#***********************************************************************/
|
||
# rulesets_not_broken.sh [ruleset]...
|
||
# Exits with 0 when each specified ruleset or, if no rulesets are specified,
|
||
# each ruleset that is developed with Freeciv, are able to load. Exits with
|
||
# 1 if any ruleset fails to load.
|
||
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_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=$@
|
||
fi
|
||
for ruleset in $rulesets; do
|
||
echo "Loading $ruleset"
|
||
@abs_top_builddir@/tests/rs_test_res/ruleset_loads.sh $ruleset || exit 1
|
||
done
|
||
echo "No broken rulesets detected."
|
||
exit 0
|