test with the current release type's settings to avoid double compiles

This commit is contained in:
Konstantin Käfer
2014-08-27 12:22:28 +02:00
parent 312cae1a05
commit a55be0217b
4 changed files with 4 additions and 19 deletions

View File

@@ -25,11 +25,11 @@ build/test/Makefile: src common config.gypi test/test.gyp
deps/run_gyp test/test.gyp --depth=. -Goutput_dir=.. --generator-output=./build/test -f make
test: build/test/Makefile
$(MAKE) -C build/test BUILDTYPE=Testing V=$(V) test
$(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) test
test_%: build/test/Makefile
$(MAKE) -C build/test BUILDTYPE=Testing V=$(V) $*
(cd build/Testing && exec ./test_$*)
$(MAKE) -C build/test BUILDTYPE=$(BUILDTYPE) V=$(V) $*
(cd build/$(BUILDTYPE) && exec ./test_$*)
# build Mac OS X project for Xcode
xtest: config.gypi clear_xcode_cache node

View File

@@ -34,16 +34,6 @@
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES'
}
},
'Testing': {
'cflags_cc': [ '-O3' ],
'defines': [ 'NDEBUG', 'TESTING' ],
'xcode_settings': {
'GCC_OPTIMIZATION_LEVEL': '3',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
'DEAD_CODE_STRIPPING': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES'
}
}
}
}
}

View File

@@ -10,7 +10,6 @@ namespace mbgl {
enum class EventSeverity : uint8_t {
Debug,
Info,
Test,
Warning,
Error,
};
@@ -18,7 +17,6 @@ enum class EventSeverity : uint8_t {
MBGL_DEFINE_ENUM_CLASS(EventSeverityClass, EventSeverity, {
{ EventSeverity::Debug, "DEBUG" },
{ EventSeverity::Info, "INFO" },
{ EventSeverity::Test, "TEST" },
{ EventSeverity::Warning, "WARNING" },
{ EventSeverity::Error, "ERROR" },
{ EventSeverity(-1), "UNKNOWN" },
@@ -61,9 +59,6 @@ constexpr EventSeverity disabledEventSeverities[] = {
#if !DEBUG
EventSeverity::Debug,
#endif
#if !TESTING
EventSeverity::Test,
#endif
};

View File

@@ -3,7 +3,7 @@
set -e
set -o pipefail
cd build/Testing
cd build/${BUILDTYPE:-Release}
for TEST in ./test_* ; do
${TEST}