fixup test directory

C++ tests load from /data/test/ again, and the _main includes in
data/ and data/test/ are fixed up to accomodate this.

This fixes up cc138a4ed9
This commit is contained in:
Chris Beck 2014-05-12 11:43:55 -04:00
parent ca5c64b6d1
commit 91d545c7d7
3 changed files with 63 additions and 52 deletions

View file

@ -2,13 +2,13 @@
# title screen and no_gui mode do not need terrain_graphics
#ifdef TITLE_SCREEN
#define NO_TERRAIN_GFX
#enddef
#define NO_TERRAIN_GFX
#enddef
#endif
#ifdef NO_GUI
#define NO_TERRAIN_GFX
#enddef
#define NO_TERRAIN_GFX
#enddef
#endif
{english.cfg}
@ -18,7 +18,7 @@
{core/}
#ifdef MULTIPLAYER
{multiplayer/}
{multiplayer/}
#endif
{campaigns/}
@ -34,24 +34,27 @@
[/ais]
#ifdef EDITOR
[textdomain]
name="wesnoth-editor"
[/textdomain]
[textdomain]
name="wesnoth-editor"
[/textdomain]
#endif
#ifdef TEST
{scenario-test.cfg}
{scenario-formula.cfg}
{scenario-formula-recruitment.cfg}
{scenario-poisoning.cfg}
{scenario-leaders.cfg}
{scenario-movethrough.cfg}
{ai/scenarios/scenario-AI_Arena_small.cfg}
{ai/scenarios/scenario-test_move_to_targets.cfg}
{ai/scenarios/scenario-lua-ai.cfg}
{ai/scenarios/scenario-no_engine.cfg}
{ai/micro_ais/scenarios/}
{test/}
{scenario-test.cfg}
{scenario-formula.cfg}
{scenario-formula-recruitment.cfg}
{scenario-poisoning.cfg}
{scenario-leaders.cfg}
{scenario-movethrough.cfg}
{ai/scenarios/scenario-AI_Arena_small.cfg}
{ai/scenarios/scenario-test_move_to_targets.cfg}
{ai/scenarios/scenario-lua-ai.cfg}
{ai/scenarios/scenario-no_engine.cfg}
{ai/micro_ais/scenarios/}
#define DONT_RELOAD_CORE
#enddef
{test/}
#endif
[textdomain]
@ -79,9 +82,9 @@
[/textdomain]
#ifndef NO_TERRAIN_GFX
# Include the terrain-graphics definitions after the campaigns so campaign specific
# terrains work properly.
{core/terrain-graphics.cfg}
# Include the terrain-graphics definitions after the campaigns so campaign specific
# terrains work properly.
{core/terrain-graphics.cfg}
#endif
[binary_path]
@ -97,13 +100,13 @@
[/textdomain]
#ifdef TUTORIAL
[binary_path]
path=data/campaigns/tutorial
[/binary_path]
[binary_path]
path=data/campaigns/tutorial
[/binary_path]
[+units]
{campaigns/tutorial/units}
[/units]
[+units]
{campaigns/tutorial/units}
[/units]
{campaigns/tutorial/scenarios}
{campaigns/tutorial/scenarios}
#endif

View file

@ -1,32 +1,40 @@
#textdomain wesnoth-test
{themes/}
#ifndef DONT_RELOAD_CORE
{themes/}
# Load core wml for tests including macros and units
{core}
[textdomain]
name="wesnoth"
[/textdomain]
[textdomain]
name="wesnoth-lib"
[/textdomain]
#endif
[textdomain]
name="wesnoth-test"
[/textdomain]
[textdomain]
name="wesnoth"
[/textdomain]
[textdomain]
name="wesnoth-lib"
[/textdomain]
#ifdef TEST
# Load core wml for tests including macros and units
##{core}
#Load test macros
{test/macros}
#Load test macros
{test/macros}
#Load test scenarios
{test/scenarios}
##{core/terrain-graphics.cfg}
[binary_path]
path=data/core
[/binary_path]
{game_config.cfg}
#Load test scenarios
{test/scenarios}
#endif
#ifndef DONT_RELOAD_CORE
[binary_path]
path=data/core
[/binary_path]
{game_config.cfg}
#endif

View file

@ -79,7 +79,7 @@ namespace test_utils {
gui2::init();
load_language_list();
game_config::config_cache::instance().add_define("TEST");
game_config::config_cache::instance().get_config(game_config::path + "/data/", cfg_);
game_config::config_cache::instance().get_config(game_config::path + "/data/test/", cfg_);
::init_textdomains(cfg_);
const std::vector<language_def>& languages = get_languages();
std::vector<language_def>::const_iterator English = std::find_if(languages.begin(),