From a3c843f90d2668c15d685abc8fe86ce42d2c4e2b Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 11 Oct 2015 14:57:35 +0200 Subject: [PATCH] clean up after tests update runtests.bat script for windows development in VS2015 --- scripts/tests/common.lua | 2 +- scripts/tests/orders.lua | 2 +- scripts/tests/storage.lua | 1 + tests/runtests.bat | 5 ++++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/tests/common.lua b/scripts/tests/common.lua index fb1a29965..69467dd11 100644 --- a/scripts/tests/common.lua +++ b/scripts/tests/common.lua @@ -45,7 +45,7 @@ function test_flags() eressea.write_game("test.dat") eressea.free_game() eressea.read_game("test.dat") - os.remove('test.dat') + os.remove('data/test.dat') f = get_faction(no) assert_equal(flags, f.flags) end diff --git a/scripts/tests/orders.lua b/scripts/tests/orders.lua index d9443c9c4..21ecbe644 100644 --- a/scripts/tests/orders.lua +++ b/scripts/tests/orders.lua @@ -104,7 +104,7 @@ function test_process_quit() eressea.write_game('test.dat') eressea.free_game() eressea.read_game('test.dat') - os.remove('test.dat') + os.remove('data/test.dat') assert_equal(nil, _G.get_faction(fno)) end diff --git a/scripts/tests/storage.lua b/scripts/tests/storage.lua index cf496224c..a0e8e780e 100644 --- a/scripts/tests/storage.lua +++ b/scripts/tests/storage.lua @@ -28,4 +28,5 @@ function test_store_unit() store:close() assert_not_nil(u) assert_equal(u:get_item("money"), u.number * 100) + os.remove(filename) end diff --git a/tests/runtests.bat b/tests/runtests.bat index 3bb41c982..94bba0d68 100644 --- a/tests/runtests.bat +++ b/tests/runtests.bat @@ -1,5 +1,8 @@ @ECHO OFF -SET BUILD=..\build-vs12\eressea\Debug\ +IF EXIST ..\build-vs10 SET BUILD=..\build-vs10\eressea\Debug +IF EXIST ..\build-vs11 SET BUILD=..\build-vs11\eressea\Debug +IF EXIST ..\build-vs12 SET BUILD=..\build-vs12\eressea\Debug +IF EXIST ..\build-vs14 SET BUILD=..\build-vs14\eressea\Debug SET SERVER=%BUILD%\eressea.exe %BUILD%\test_eressea.exe %SERVER% ..\scripts\run-tests.lua