Skip to content

Commit 32cd073

Browse files
committed
CMake: Update build tools python modules to pick refactored way of unittest CMake
- Update mbed_unittest python module to pick unittest from mbed os root CMake configuration file - Add BUILD_TESTING flag ON in test python module
1 parent 7040922 commit 32cd073

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

UNITTESTS/mbed_unittest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
"""
4-
Copyright (c) 2018, Arm Limited
4+
Copyright (c) 2018-2021, Arm Limited
55
SPDX-License-Identifier: Apache-2.0
66
77
Licensed under the Apache License, Version 2.0 (the "License");
@@ -71,9 +71,8 @@ def _mbed_unittest_test(options, cwd, pwd):
7171
clean=options.clean)
7272

7373
if options.compile_only:
74-
# Create makefiles
75-
src_path = os.path.relpath(pwd, options.build)
76-
tool.create_makefiles(path_to_src=src_path,
74+
# Create makefiles
75+
tool.create_makefiles(path_to_src=cwd,
7776
generator=options.cmake_generator,
7877
coverage_output_type=options.coverage,
7978
debug=options.debug_build,

UNITTESTS/unit_test/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def create_makefiles(self,
8686
args = [cmake,
8787
"-G",
8888
generator,
89+
"-DBUILD_TESTING=ON"
8990
"-DCMAKE_MAKE_PROGRAM=%s" % self.make_program,
9091
"-DCMAKE_CXX_COMPILER=%s" % get_cxx_tool(),
9192
"-DCMAKE_C_COMPILER=%s" % get_c_tool()]

0 commit comments

Comments
 (0)