From d5443f88d8d9b12eef9b831cb2913ae8297ec147 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 2 Aug 2012 00:06:22 -0700 Subject: [PATCH 1/8] laen test does not work. trying to make setresource add the raw material to fix it --- eressea | 2 +- scripts/tests/e3a.lua | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/eressea b/eressea index f6b5728b4..1fe075e82 160000 --- a/eressea +++ b/eressea @@ -1 +1 @@ -Subproject commit f6b5728b4925afcb5c9b1cf64a0cc74ea2e09304 +Subproject commit 1fe075e82d4f84c4e198389b4e85304e10557570 diff --git a/scripts/tests/e3a.lua b/scripts/tests/e3a.lua index cc0bf61ac..e426725b9 100644 --- a/scripts/tests/e3a.lua +++ b/scripts/tests/e3a.lua @@ -237,22 +237,22 @@ function test_taxes() end function test_leave() - local r = region.create(0, 0, "plain") - local f = faction.create("noreply@eressea.de", "human", "de") - f.id = 42 - local b1 = building.create(r, "castle") - b1.size = 10 - local b2 = building.create(r, "lighthouse") - b2.size = 10 - local u = unit.create(f, r, 1) - u.building = b1 - assert_not_equal(nil, u.building) - u:add_item("money", u.number * 100) - u:clear_orders() - u:add_order("BETRETE BURG " .. itoa36(b2.id)) - update_owners() - process_orders() - assert_equal(u.building.id, b1.id, "region owner has left the building") -- region owners may not leave + local r = region.create(0, 0, "plain") + local f = faction.create("noreply@eressea.de", "human", "de") + f.id = 42 + local b1 = building.create(r, "castle") + b1.size = 10 + local b2 = building.create(r, "lighthouse") + b2.size = 10 + local u = unit.create(f, r, 1) + u.building = b1 + assert_not_equal(nil, u.building) + u:add_item("money", u.number * 100) + u:clear_orders() + u:add_order("BETRETE BURG " .. itoa36(b2.id)) + update_owners() + process_orders() + assert_equal(u.building, b1, "region owner has left the building") -- region owners may not leave end function test_market() From 0748b98c4be397d5725de961c33228145286691b Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 3 Aug 2012 00:41:27 -0700 Subject: [PATCH 2/8] fix broken laen tests by hacking in another config setting --- eressea | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eressea b/eressea index 1fe075e82..cde0ce074 160000 --- a/eressea +++ b/eressea @@ -1 +1 @@ -Subproject commit 1fe075e82d4f84c4e198389b4e85304e10557570 +Subproject commit cde0ce07424e19db30c2d61ce6356cf58fa12ba8 From e378397fb4346b93f9a2c1b722862fde4d5a6447 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 3 Aug 2012 00:52:24 -0700 Subject: [PATCH 3/8] searching for bug where owners leave castle --- scripts/tests/e3a.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/tests/e3a.lua b/scripts/tests/e3a.lua index e426725b9..5bef245c4 100644 --- a/scripts/tests/e3a.lua +++ b/scripts/tests/e3a.lua @@ -179,6 +179,10 @@ function test_ship_capacity() update_owners() process_orders() + if r2~=u1.region then + print(get_turn(), u1, u1.faction) + write_reports() + end assert_equal(r2, u1.region) assert_not_equal(r2, u2.region) if r2~=u3.region then @@ -246,13 +250,14 @@ function test_leave() b2.size = 10 local u = unit.create(f, r, 1) u.building = b1 - assert_not_equal(nil, u.building) u:add_item("money", u.number * 100) u:clear_orders() u:add_order("BETRETE BURG " .. itoa36(b2.id)) - update_owners() process_orders() - assert_equal(u.building, b1, "region owner has left the building") -- region owners may not leave + init_reports() + write_report(u.faction) + print(u.faction) + assert_equal(b1, u.building, "region owner has left the building") -- region owners may not leave end function test_market() From 3d7be88bad7725345f12198834e9bbb05fc7f373 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 21 Oct 2012 19:48:40 -0700 Subject: [PATCH 4/8] Working on http://bugs.eressea.de/view.php?id=1946 (WIP) --- .gitignore | 2 ++ eressea | 2 +- game-e3/eressea.ini | 2 +- src/main.c | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 24ed2df2e..78d475c70 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ build-*/ ipch/ *.log src/Release/ +game-e3/data/ +game-e3/reports/ diff --git a/eressea b/eressea index cde0ce074..79feb5723 160000 --- a/eressea +++ b/eressea @@ -1 +1 @@ -Subproject commit cde0ce07424e19db30c2d61ce6356cf58fa12ba8 +Subproject commit 79feb5723c075a45a1a94ed286c87993314ce8da diff --git a/game-e3/eressea.ini b/game-e3/eressea.ini index 98dd9fc1b..efc181a02 100644 --- a/game-e3/eressea.ini +++ b/game-e3/eressea.ini @@ -11,7 +11,7 @@ locales = de,en [config] game = e3a source_dir = .. -maxnmrs = 10 +maxnmrs = 20 [editor] color = 1 diff --git a/src/main.c b/src/main.c index 5180af4b0..c2fb6cc8a 100644 --- a/src/main.c +++ b/src/main.c @@ -89,6 +89,10 @@ static int parse_args(int argc, char **argv, int *exitcode) case 't': turn = atoi(argv[i][2] ? argv[i]+2 : argv[++i]); break; + case 'r': + entry_point = "run_turn"; + turn = atoi(argv[i][2] ? argv[i]+2 : argv[++i]); + break; case 'q': verbosity = 0; break; From ccac0f824bd715f1a98b1289ae69877abc7a84c5 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 18 Feb 2013 01:28:39 +0000 Subject: [PATCH 5/8] use new 64-bit safe version of quicklist --- quicklist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quicklist b/quicklist index 23d8a36de..89719053f 160000 --- a/quicklist +++ b/quicklist @@ -1 +1 @@ -Subproject commit 23d8a36de9cd909aee2aac11c18f9f1311a30b40 +Subproject commit 89719053f50299604e2ea539dac04597480d1acf From b4cea49843a0ada276fed46003ed757da4db3744 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 18 Feb 2013 01:29:15 +0000 Subject: [PATCH 6/8] copy the configure script from the arda server, it is useful --- configure | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 configure diff --git a/configure b/configure new file mode 100755 index 000000000..20fbab8aa --- /dev/null +++ b/configure @@ -0,0 +1,28 @@ +#!/bin/sh +MACHINE=`uname -m` +BIN_DIR="build-$MACHINE-Debug" +[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc" +[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc" +[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc" +[ -z "$JOBS" ] && JOBS=1 + +DISTCC=`which distcc` +if [ ! -z "$DISTCC" ] ; then +JOBS=`distcc -j` +if [ -z "$JOBS" ] ; then +JOBS=1 +elif [ $JOBS -gt 1 ] ; then +CC="distcc $CC" +MAKEOPTS=-j$JOBS +fi +fi +echo "Building with $CC and $JOBS jobs" + +mkdir -p $BIN_DIR +cd $BIN_DIR +CC="$CC" cmake .. -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules -DCMAKE_BUILD_TYPE=Debug +make -j$JOBS +make test +cd ../game +ln -sf ../$BIN_DIR/server/server +./server -e run_tests From 14f83b91e62950bc300a1433471ca64c36ab5eef Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 18 Feb 2013 01:41:04 +0000 Subject: [PATCH 7/8] update configure script for multiple game directories --- configure | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 20fbab8aa..8bebf3813 100755 --- a/configure +++ b/configure @@ -23,6 +23,10 @@ cd $BIN_DIR CC="$CC" cmake .. -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules -DCMAKE_BUILD_TYPE=Debug make -j$JOBS make test -cd ../game -ln -sf ../$BIN_DIR/server/server -./server -e run_tests +cd .. +for GAME in game* ; do + cd $GAME + ln -sf ../$BIN_DIR/server/server + ./server -e run_tests + cd .. +done From f60e926ec3ad9c27089728da982a977547df46c8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 18 Feb 2013 14:40:37 -0800 Subject: [PATCH 8/8] latest quicklist version, tests compile on 64-bit compilers --- quicklist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quicklist b/quicklist index 89719053f..e9d0875c7 160000 --- a/quicklist +++ b/quicklist @@ -1 +1 @@ -Subproject commit 89719053f50299604e2ea539dac04597480d1acf +Subproject commit e9d0875c703291490baec3f582a5b3d30c18f5a0