diff --git a/s/travis-build b/s/travis-build index 17c17fb10..414a70f80 100755 --- a/s/travis-build +++ b/s/travis-build @@ -19,4 +19,4 @@ inifile s/runtests cd tests ./write-reports.sh -#./run-turn.sh +./run-turn.sh diff --git a/scripts/run-turn.lua b/scripts/run-turn.lua index ebf6acfb7..20a8de05b 100644 --- a/scripts/run-turn.lua +++ b/scripts/run-turn.lua @@ -60,7 +60,7 @@ local function write_emails(locales) end local function join_path(a, b) - if a then return a .. '/' .. b + if a then return a .. '/' .. b end return b end @@ -99,7 +99,9 @@ local function write_htpasswd() local out = io.open(join_path(config.basepath, "htpasswd"), "w") if out then for f in factions() do - out:write(itoa36(f.id) .. ":" .. f.password .. "\n") + if f.password then + out:write(itoa36(f.id) .. ":" .. f.password .. "\n") + end end out:close() end diff --git a/src/bindings.c b/src/bindings.c index 99458c08d..72f14103d 100755 --- a/src/bindings.c +++ b/src/bindings.c @@ -96,7 +96,7 @@ TOLUA_PKG(game); int log_lua_error(lua_State * L) { const char *error = lua_tostring(L, -1); - log_fatal("LUA call failed.\n%s\n", error); + log_fatal("Lua call failed.\n%s\n", error); lua_pop(L, 1); return 1; } @@ -1183,6 +1183,7 @@ int eressea_run(lua_State *L, const char *luafile) err = lua_pcall(L, 1, 1, -3); if (err != 0) { log_lua_error(L); + assert(!"Lua syntax error? check log."); } else { if (lua_isnumber(L, -1)) { diff --git a/src/modules/museum.c b/src/modules/museum.c index e1e7d33e5..516bf775f 100644 --- a/src/modules/museum.c +++ b/src/modules/museum.c @@ -194,7 +194,7 @@ void warden_add_give(unit * src, unit * u, const item_type * itype, int n) void create_museum(void) { -#if 0 /* TODO: move this to LUA. It should be possible. */ +#if 0 /* TODO: move this to Lua. It should be possible. */ unsigned int museum_id = hashstring("museum"); plane *museum = getplanebyid(museum_id); region *r; diff --git a/tests/run-turn.sh b/tests/run-turn.sh index 4055613e5..622ab68ab 100755 --- a/tests/run-turn.sh +++ b/tests/run-turn.sh @@ -1,4 +1,4 @@ -NEWFILES="data/185.dat datum parteien parteien.full passwd score turn" +NEWFILES="data/185.dat datum parteien parteien.full htpasswd score turn" cleanup () { rm -rf reports $NEWFILES } @@ -19,6 +19,7 @@ expr=$2 expect=$3 count=`grep -cE $expr $file` [ $count -eq $expect ] || quit 1 "expected $expect counts of $expr in $file, got $count" +echo "PASS: $expr is $expect" } ROOT=`pwd` @@ -34,10 +35,11 @@ VALGRIND=`which valgrind` SERVER=../Debug/eressea/eressea if [ -n "$VALGRIND" ]; then SUPP=../share/ubuntu-12_04.supp -SERVER="$VALGRIND --suppressions=$SUPP --error-exitcode=1 --leak-check=no $SERVER" +SERVER="$VALGRIND --track-origins=yes --gen-suppressions=all --suppressions=$SUPP --error-exitcode=1 --leak-check=no $SERVER" fi echo "running $SERVER" $SERVER -t 184 ../scripts/run-turn.lua +echo "integration tests" [ -d reports ] || quit 4 "no reports directory created" CRFILE=185-zvto.cr for file in $NEWFILES reports/$CRFILE ; do