From a50ea0750e032bece7528c9c51e248443362af38 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 4 Apr 2012 15:19:37 -0700 Subject: [PATCH] compile c++ tests even if only installing and hook them all up automatically to make test target --- Makefile | 5 ++--- tests/cpp_tests/build.py | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 624f1cb69..ac4e62b99 100755 --- a/Makefile +++ b/Makefile @@ -18,9 +18,8 @@ uninstall: python scons/scons.py uninstall test: - @python tests/visual_tests/test.py - @tests/cpp_tests/font_registration_test - @tests/cpp_tests/params_test + @python tests/visual_tests/test.py -q + @tests/cpp_tests/*-bin @python tests/run_tests.py -q pep8: diff --git a/tests/cpp_tests/build.py b/tests/cpp_tests/build.py index bcc31bc94..3750717fd 100644 --- a/tests/cpp_tests/build.py +++ b/tests/cpp_tests/build.py @@ -14,5 +14,8 @@ libraries.append('mapnik') test_env.Append(CXXFLAGS='-g') for cpp_test in glob.glob('*_test.cpp'): - test_program = test_env.Program(cpp_test.replace('.cpp',''), [cpp_test], CPPPATH=headers, LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) + test_program = test_env.Program(cpp_test.replace('.cpp','-bin'), [cpp_test], CPPPATH=headers, LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) Depends(test_program, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME'])) + # build locally if installing + if 'install' in COMMAND_LINE_TARGETS: + env.Alias('install',test_program)