Feature #1337 ยป 0033-Meson-Generate-ruleset_loads.sh.patch
| meson.build | ||
|---|---|---|
|
s_root, '@OUTPUT@'],
|
||
|
build_by_default: get_option('gitrev'))
|
||
|
rsloads = custom_target('rsloads', output: 'ruleset_loads.sh',
|
||
|
command: [sh_exe, files('tests/rs_test_res//generate_ruleset_loads.sh'),
|
||
|
'@OUTPUT@'])
|
||
|
if host_system == 'windows'
|
||
|
tinycthr_files = files('dependencies/tinycthread/fc_tinycthread.c')
|
||
|
else
|
||
| tests/Makefile.am | ||
|---|---|---|
|
## Process this file with automake to produce Makefile.in
|
||
|
# Currently the "src-check" directive creates a check-output file containing
|
||
|
# the results of the checks. It might be better to actually fail the make run
|
||
|
# the results of the checks. It might be better to actually fail the make run
|
||
|
# if the check fails.
|
||
|
src-check:
|
||
|
$(srcdir)/src-check.sh
|
||
| ... | ... | |
|
rs_test_res/ruleset_list_dist.txt \
|
||
|
rs_test_res/ruleset_list_opt.txt \
|
||
|
rs_test_res/ruleset_loads.sh.in \
|
||
|
rs_test_res/generate_ruleset_loads.sh \
|
||
|
rulesets_autohelp.sh.in \
|
||
|
src-check.sh \
|
||
|
trailing_spaces.sh \
|
||
| tests/rs_test_res/generate_ruleset_loads.sh | ||
|---|---|---|
|
#!/usr/bin/env bash
|
||
|
#/***********************************************************************
|
||
|
# Freeciv - Copyright (C) 2017-2025
|
||
|
# 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.
|
||
|
#
|
||
|
#***********************************************************************/
|
||
|
SRCDIR="$(cd $(dirname $0) ; pwd)"
|
||
|
(
|
||
|
echo "# Generated by generate_ruleset_loads.sh."
|
||
|
echo
|
||
|
echo "# ruleset_loads.sh ruleset"
|
||
|
echo "# Exits with 0 when the specified ruleset is able to load. Exits with 1 if"
|
||
|
echo "# it fails to load."
|
||
|
echo
|
||
|
echo "(echo \"lua unsafe-file ${SRCDIR}/ruleset_is.lua\" |"
|
||
|
echo " (EXPECTED_RULESET=\$1 ./run.sh freeciv-server -F --Announce none --ruleset \$1)) ||"
|
||
|
echo "exit 1"
|
||
|
echo
|
||
|
echo "# The ruleset was able to load."
|
||
|
echo "exit 0"
|
||
|
) > $1
|
||
|
chmod +x "$1"
|
||