Add server.log and journal.log to nightly build
Turn on journaling using journal.econfig. Append the server.log and journal.log files to the nightly build log in the SERVERSTOP step. Remove the server.log and journal.log in the SERVERSTART step to ensure only this run's log events are included in the nightly build log. Add the construction of a econfig in the generate step using *.econfig in the patches directory in a same way code patches are applied. The mingw.patch was removed and replaced with the mingw.econfig. The mingw.econfig also required the addition of exports to the win32.i386.config.
This commit is contained in:
parent
0f458d2c0c
commit
d9cc5aab10
5 changed files with 70 additions and 40 deletions
|
@ -1,9 +1,10 @@
|
|||
SCRIPTDIR=/home/empire
|
||||
BOXDIR=boxes
|
||||
export BOXDIR=boxes
|
||||
LOGDIR=logs
|
||||
INSTANCE=win32.i386
|
||||
export INSTANCE=win32.i386
|
||||
EMPPORT=8889
|
||||
NIGHTLY_SKIP_STEP=
|
||||
GITROOT=ssh://ron-VM2/~empire/empserver.git
|
||||
PATH=$PATH:/c/Progra~1/git/bin
|
||||
export MINGW_DIR="c:/MinGW"
|
||||
|
||||
|
|
|
@ -227,6 +227,49 @@ do
|
|||
break
|
||||
fi
|
||||
|
||||
if [ ! -f emp4/etc/empire/econfig ]
|
||||
then
|
||||
warn "econfig file is missing"
|
||||
break
|
||||
fi
|
||||
|
||||
if ! emp4/sbin/pconfig >emp4/etc/empire/econfig
|
||||
then
|
||||
warn "pconfig failed to create econfig file"
|
||||
break
|
||||
fi
|
||||
echo "Applying global econfig patches from ${BOXDIR}/${WORKDIR}/empserver/src/scripts/nightly/patches/All"
|
||||
for i in "${BOXDIR}/${WORKDIR}/empserver/src/scripts/nightly/patches/All"/*.econfig
|
||||
do
|
||||
[ -r "${i}" ] || continue
|
||||
if "${i}" >>emp4/etc/empire/econfig
|
||||
then
|
||||
echo "${i}: OK"
|
||||
else
|
||||
echo "========== ${i}: NOT OK! ${?} =========="
|
||||
fi
|
||||
done
|
||||
echo "Done (econfig patch All)."
|
||||
echo ""
|
||||
|
||||
LOCALPATCHDIRECTORY="${BOXDIR}/${WORKDIR}/empserver/src/scripts/nightly/patches/${INSTANCE}"
|
||||
if [ -n "${LOCALPATCHDIRECTORY}" -a -d "${LOCALPATCHDIRECTORY}/." ]
|
||||
then
|
||||
echo "Applying system specific econfig patches from ${LOCALPATCHDIRECTORY}:"
|
||||
for i in "${LOCALPATCHDIRECTORY}"/*.econfig
|
||||
do
|
||||
[ -r "${i}" ] || continue
|
||||
if "${i}" >>emp4/etc/empire/econfig
|
||||
then
|
||||
echo "${i}: OK"
|
||||
else
|
||||
echo "========== ${i}: NOT OK! ${?} =========="
|
||||
fi
|
||||
done
|
||||
echo "Done (econfig patch specific)."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
cd emp4/bin || err "Could not cd to emp4/bin"
|
||||
|
||||
echo "Determining type of files in bin directory"
|
||||
|
@ -242,8 +285,8 @@ do
|
|||
echo ""
|
||||
|
||||
echo "Running files and fairland"
|
||||
echo y | ./files || warn "Error running files"
|
||||
./fairland -R 1 10 30 >/dev/null || { warn "Error running fairland" ; break ; }
|
||||
echo y | ./files -e ../etc/empire/econfig || warn "Error running files"
|
||||
./fairland -R 1 -e ../etc/empire/econfig 10 30 >/dev/null || { warn "Error running fairland" ; break ; }
|
||||
[ -s "newcap_script" ] || { warn "fairland did not produce newcap_script" ; break ; }
|
||||
echo "Done (files & fairland)."
|
||||
echo ""
|
||||
|
@ -262,8 +305,17 @@ do
|
|||
*SERVERSTART*) ;;
|
||||
*)
|
||||
|
||||
echo "Removing existing server.log and journal.log"
|
||||
if [ -f "../var/empire/server.log" ]
|
||||
then
|
||||
rm "../var/empire/server.log"
|
||||
fi
|
||||
if [ -f "../var/empire/journal.log" ]
|
||||
then
|
||||
rm "../var/empire/journal.log"
|
||||
fi
|
||||
echo "Starting server with -d in the background"
|
||||
./emp_server -R 1 -d &
|
||||
./emp_server -R 1 -e ../etc/empire/econfig -d 2>/dev/null &
|
||||
PID="$!"
|
||||
sleep 1
|
||||
kill -0 "${PID}" || { warn "emp_server not running ?" ; break ; }
|
||||
|
@ -995,7 +1047,14 @@ EOF
|
|||
echo "Stopping server"
|
||||
trykill "${PID}"
|
||||
echo "Done (kill)."
|
||||
echo ""
|
||||
cd "${BOXDIR}/${WORKDIR}/emp4/var/empire" || err "Could not cd to ${BOXDIR}/${WORKDIR}/emp4/var/empire"
|
||||
echo "-- Start Server Log --"
|
||||
cat server.log
|
||||
echo "-- End of Server Log --"
|
||||
echo "-- Start Journal Log --"
|
||||
cat journal.log
|
||||
echo "-- End of Journal Log --"
|
||||
echo "Server stopped"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
|
1
src/scripts/nightly/patches/All/journal.econfig
Normal file
1
src/scripts/nightly/patches/All/journal.econfig
Normal file
|
@ -0,0 +1 @@
|
|||
echo keep_journal 1
|
3
src/scripts/nightly/patches/win32.i386/mingw.econfig
Normal file
3
src/scripts/nightly/patches/win32.i386/mingw.econfig
Normal file
|
@ -0,0 +1,3 @@
|
|||
echo data "$MINGW_DIR$BOXDIR/$INSTANCE/emp4/var/empire"
|
||||
echo info "$MINGW_DIR$BOXDIR/$INSTANCE/emp4/share/empire/info.nr"
|
||||
echo builtin "$MINGW_DIR$BOXDIR/$INSTANCE/emp4/share/empire/builtin"
|
|
@ -1,34 +0,0 @@
|
|||
diff --git a/src/lib/global/path.c.in b/src/lib/global/path.c.in
|
||||
index a761735..77b9c50 100644
|
||||
--- a/src/lib/global/path.c.in
|
||||
+++ b/src/lib/global/path.c.in
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "optlist.h"
|
||||
|
||||
/* econfig file to try when user doesn't specify one */
|
||||
-char dflt_econfig[] = "@econfig@";
|
||||
+char dflt_econfig[] = "c:/MinGW@econfig@";
|
||||
|
||||
/*
|
||||
* Where to find configuration (absolute file name)
|
||||
@@ -53,17 +53,17 @@ char *custom_tables = "";
|
||||
char *schedulefil;
|
||||
|
||||
/* Where to find built-in configuration tables (relative to configdir) */
|
||||
-char *builtindir_conf = "@builtindir@";
|
||||
+char *builtindir_conf = "c:/MinGW@builtindir@";
|
||||
/* Where to find built-in configuration tables (absolute) */
|
||||
char *builtindir;
|
||||
|
||||
/* Where to find info pages (relative to configdir) */
|
||||
-char *infodir_conf = "@einfodir@";
|
||||
+char *infodir_conf = "c:/MinGW@einfodir@";
|
||||
/* Where to find info pages (absolute) */
|
||||
char *infodir;
|
||||
|
||||
/* Where this game's data is stored (relative to configdir) */
|
||||
-char *gamedir_conf = "@gamedir@";
|
||||
+char *gamedir_conf = "c:/MinGW@gamedir@";
|
||||
/* Where this game's data is stored (absolute) */
|
||||
char *gamedir;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue