#5390 Add --skip-tests config option

This commit is contained in:
Andrew Nelless 2016-06-24 16:51:25 +01:00 committed by Jerry (Xinyu Hou)
parent c5d5d5cba0
commit f7d8ea9686
2 changed files with 9 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class Toolchain:
# options used by all commands
globalOptions = 'v'
globalOptionsLong = ['no-prompts', 'verbose', 'skip-gui', 'skip-core']
globalOptionsLong = ['no-prompts', 'verbose', 'skip-gui', 'skip-core', 'skip-tests']
# list of valid commands as keys. the values are optarg strings, but most
# are None for now (this is mainly for extensibility)
@ -240,6 +240,9 @@ class InternalCommands:
# by default, compile the gui
enableMakeGui = True
# by default, compile the tests
enableMakeTests = True
# by default, unknown
macSdk = None
@ -442,6 +445,8 @@ class InternalCommands:
cmake_args += " -DCMAKE_OSX_DEPLOYMENT_TARGET=" + self.macSdk
cmake_args += " -DOSX_TARGET_MAJOR=" + macSdkMatch.group(1)
cmake_args += " -DOSX_TARGET_MINOR=" + macSdkMatch.group(2)
cmake_args += " -DDISABLE_TESTS=" + str(int(not self.enableMakeTests))
# if not visual studio, use parent dir
sourceDir = generator.getSourceDir()
@ -1914,6 +1919,8 @@ class CommandHandler:
self.ic.enableMakeGui = False
elif o == '--skip-core':
self.ic.enableMakeCore = False
elif o == '--skip-tests':
self.ic.enableMakeTests = False
elif o in ('-d', '--debug'):
self.build_targets += ['debug',]
elif o in ('-r', '--release'):

View File

@ -18,6 +18,6 @@ add_subdirectory(lib)
add_subdirectory(cmd)
add_subdirectory(micro)
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "IRIX")
if ((NOT ${CMAKE_SYSTEM_NAME} MATCHES "IRIX") AND (NOT ${DISABLE_TESTS}))
add_subdirectory(test)
endif()