Revert "scons: remove SDL_net dependency from unit tests"

This reverts commit 101e5d36ef.
This commit is contained in:
loonycyborg 2016-06-09 12:29:08 +03:00
parent 101e5d36ef
commit 550fa9086b
2 changed files with 5 additions and 3 deletions

View file

@ -457,7 +457,7 @@ if env["prereqs"]:
test_env = client_env.Clone()
conf = test_env.Configure(**configure_args)
have_test_prereqs = have_client_prereqs and conf.CheckBoost('unit_test_framework') \
have_test_prereqs = have_client_prereqs and conf.CheckBoost('unit_test_framework') and conf.CheckSDL("SDL2_net", header_file = "SDL_net") \
or Warning("WARN: Unit tests are disabled because their prerequisites are not met")
test_env = conf.Finish()
if not have_test_prereqs and "test" in env["default_targets"]:

View file

@ -22,6 +22,7 @@ libwesnoth_core_sources = Split("""
map/map.cpp
md5.cpp
mt_rng.cpp
network.cpp
seed_rng.cpp
serialization/binary_or_text.cpp
serialization/parser.cpp
@ -39,6 +40,8 @@ libwesnoth_core_sources = Split("""
version.cpp
""")
libwesnoth_core_sources.extend(campaignd_env.Object("network_worker.cpp", EXTRA_DEFINE = env['raw_sockets'] and "NETWORK_USE_RAW_SOCKETS" or None))
game_config_env = campaignd_env.Clone()
filesystem_env = campaignd_env.Clone()
if env["PLATFORM"] != "win32":
@ -628,8 +631,6 @@ campaignd_sources = Split("""
campaign_server/addon_utils.cpp
campaign_server/blacklist.cpp
server/input_stream.cpp
network.cpp
network_worker.cpp
""")
if env["PLATFORM"] == "win32": env["fifodir"] = ""
@ -715,6 +716,7 @@ test_sources = Split("""
tests/test_make_enum.cpp
tests/test_map_location.cpp
tests/test_mp_connect.cpp
tests/test_network_worker.cpp
tests/test_recall_list.cpp
tests/test_rng.cpp
tests/test_sdl_utils.cpp