-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
48 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
option('unittest', type: 'feature') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
gmock = dependency('gmock') | ||
gtest = dependency('gtest', main: true) | ||
assert(boost.found(), 'Boost headers are required to build unit tests') | ||
assert(mbedcrypto.found(), 'libmbedcrypto is required to build unit tests') | ||
assert(have_urandom, '/dev/urandom is required to build unit tests') | ||
assert(have_socket_h, 'sys/socket.h is required to build unit tests') | ||
|
||
unittest_exe = executable('unittest', | ||
unittest_files, | ||
dependencies: [lib_dep, gmock, gtest], | ||
include_directories: ['..'], | ||
) | ||
test('unittest', unittest_exe) | ||
gmock = dependency('gmock', required: false) | ||
gtest = dependency('gtest', main: true, required: false) | ||
if gmock.found() and gtest.found() and boost.found() and mbedcrypto.found() and have_urandom and have_socket_h | ||
unittest_exe = executable('unittest', | ||
unittest_files, | ||
dependencies: [lib_dep, gmock, gtest], | ||
include_directories: ['..'], | ||
) | ||
test('unittest', unittest_exe) | ||
elif unittest_option.enabled() | ||
error('unittest enabled but is missing dependency') | ||
endif |