Skip to content

Commit b12e4aa

Browse files
committed
Fix unit tests CMake script
1 parent b793074 commit b12e4aa

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/ci-workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- master
88
- develop
99
- liquid_develop
10+
- tmp_ci_test
1011
pull_request:
1112
branches:
1213
- master

unit-tests/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ project(unit_tests
3030
DESCRIPTION "Unit tests for Ledger Nano application"
3131
LANGUAGES C)
3232

33-
# Detect strlcpy availability and include fallback if necessary
34-
include(CheckFunctionExists)
35-
check_function_exists(strlcpy HAVE_STRLCPY)
36-
if(NOT HAVE_STRLCPY)
37-
add_compile_options(-include libs/fallback_strlcpy.h)
38-
endif()
39-
4033
# guard against bad build-type strings
4134
if(NOT CMAKE_BUILD_TYPE)
4235
set(CMAKE_BUILD_TYPE "Debug")
@@ -80,18 +73,25 @@ if(HAVE_LIQUID)
8073
message("${BoldCyan}** LIQUID SUPPORT ENABLED **${ColourReset}")
8174
endif()
8275

76+
# Include directories
8377
include_directories(../src)
8478
include_directories(../src/common)
8579
include_directories(mock_includes)
80+
include_directories(libs)
8681
include_directories(lib/sha-2)
8782

83+
# Detect strlcpy availability and include fallback if necessary
84+
include(CheckFunctionExists)
85+
check_function_exists(strlcpy HAVE_STRLCPY)
86+
if(NOT HAVE_STRLCPY)
87+
add_compile_options(-include fallback_strlcpy.h)
88+
endif()
89+
8890
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
8991
include_directories(/usr/local/include)
9092
link_directories(/usr/local/lib)
9193
endif()
9294

93-
include_directories(libs)
94-
9595
add_executable(test_apdu_parser test_apdu_parser.c)
9696
add_executable(test_base58 test_base58.c)
9797
add_executable(test_bip32 test_bip32.c)

0 commit comments

Comments
 (0)