NAME = 'unit_tests' DESCRIPTION = "Build & run unit tests" # Directory under which all built files/directories will be placed BUILD_DIR = _globals.from_build_root(NAME) # Directory to place all c object files OBJ_DIR = os.path.join(BUILD_DIR, 'obj') #------------------------------------ # Unit test runner code generator # Path of the test runner generator script UNIT_TESTS_RUNNER_GENERATOR = _globals.from_proj_root( 'test', 'unit_test_harness', 'Unity', 'scripts', 'makeTestRunner.py') # Root directory of the unit tests UNIT_TESTS_LOCATION = _globals.from_proj_root( 'test', 'unit_tests') # Path of the generated test runner source UNIT_TEST_RUNNER_SOURCE = _globals.from_build_root( 'generated_src', '_all_tests.c') #------------------------------------ # Compiler & linker COMPILER = 'gcc' COMPILER_DEFINITIONS = []
#------------------------------------ # Compiler & linker COMPILER = 'gcc' COMPILER_DEFINITIONS = [] COMPILER_FLAGS = [ '-O0', # no optimisation '-g3', # full debugging info '-Wall', # all warnings '-MMD' # generate dependency files ] COMPILER_INCLUDE_DIRS = [ _globals.from_proj_root('include'), ] LINKER = 'gcc' SOURCE_DIRS = [ _globals.from_proj_root('source'), _globals.from_proj_root('test', 'scratchpad') ] SOURCES = [] for sdir in SOURCE_DIRS: SOURCES += file_utils.find(sdir, '*.c') OBJECTS = [_globals.source_to_obj_path(source, OBJ_DIR) for source in SOURCES]