mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
Rework fpp test (#3912)
* Add FppTestProject level * Fix FPP Test Project UT errors * Add back in FppTest deployment & make empty main in source.cpp * Remove Wold-style-cast to see if that fixes CI issues * Update add_compile_options --------- Co-authored-by: M Starch <LeStarch@googlemail.com>
This commit is contained in:
parent
f409488672
commit
0bb6d59230
8
.github/workflows/fpp-tests.yml
vendored
8
.github/workflows/fpp-tests.yml
vendored
@ -31,17 +31,17 @@ jobs:
|
||||
pip3 install -r ./requirements.txt
|
||||
shell: bash
|
||||
- name: "Generate UT build cache"
|
||||
working-directory: ./FppTest
|
||||
working-directory: ./FppTestProject
|
||||
run: |
|
||||
fprime-util generate --ut
|
||||
shell: bash
|
||||
- name: "Build UTs"
|
||||
working-directory: ./FppTest
|
||||
working-directory: ./FppTestProject/FppTest
|
||||
run: |
|
||||
fprime-util build --ut
|
||||
shell: bash
|
||||
- name: "Run UTs"
|
||||
working-directory: ./FppTest
|
||||
working-directory: ./FppTestProject/FppTest
|
||||
run: |
|
||||
fprime-util check
|
||||
shell: bash
|
||||
@ -50,5 +50,5 @@ jobs:
|
||||
if: always()
|
||||
with:
|
||||
name: FppTest-Logs
|
||||
path: ./FppTest/build-fprime-automatic-native-ut/Testing/Temporary/*.log
|
||||
path: ./FppTestProject/build-fprime-automatic-native-ut/Testing/Temporary/*.log
|
||||
retention-days: 5
|
||||
|
||||
@ -1 +0,0 @@
|
||||
// Empty source file so that SOURCES for target FppTest is not empty
|
||||
39
FppTestProject/CMakeLists.txt
Normal file
39
FppTestProject/CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
||||
###
|
||||
# FPP Test
|
||||
#
|
||||
# Builds unit tests for FPP autocoder
|
||||
###
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(FppTest C CXX)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/FPrime.cmake")
|
||||
|
||||
add_compile_options(
|
||||
-Wall
|
||||
-Wconversion
|
||||
-Wdouble-promotion
|
||||
-Werror
|
||||
-Wextra
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-Wold-style-cast>
|
||||
-Wshadow
|
||||
-pedantic
|
||||
)
|
||||
|
||||
# Required by F Prime
|
||||
add_compile_options(
|
||||
-Wno-unused-parameter
|
||||
-Wno-vla
|
||||
)
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/FPrime-Code.cmake")
|
||||
|
||||
# Required by Google Test typed tests
|
||||
check_cxx_compiler_flag(-Wno-variadic-macro-arguments-omitted VAR_MAC_OMITTED_SUPPORTED)
|
||||
if(VAR_MAC_OMITTED_SUPPORTED)
|
||||
add_compile_options(-Wno-variadic-macro-arguments-omitted)
|
||||
endif()
|
||||
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FppTest/")
|
||||
@ -3,39 +3,6 @@
|
||||
#
|
||||
# Builds unit tests for FPP autocoder
|
||||
###
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
cmake_policy(SET CMP0048 NEW)
|
||||
project(FppTest C CXX)
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/FPrime.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/FPrime-Code.cmake")
|
||||
|
||||
add_compile_options(
|
||||
-Wall
|
||||
-Wconversion
|
||||
-Wdouble-promotion
|
||||
-Werror
|
||||
-Wextra
|
||||
-Wold-style-cast
|
||||
-Wshadow
|
||||
-pedantic
|
||||
)
|
||||
|
||||
# Required by F Prime
|
||||
add_compile_options(
|
||||
-Wno-unused-parameter
|
||||
-Wno-vla
|
||||
)
|
||||
|
||||
# Required by Google Test typed tests
|
||||
check_cxx_compiler_flag(-Wno-variadic-macro-arguments-omitted VAR_MAC_OMITTED_SUPPORTED)
|
||||
if(VAR_MAC_OMITTED_SUPPORTED)
|
||||
add_compile_options(-Wno-variadic-macro-arguments-omitted)
|
||||
endif()
|
||||
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/array/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/component/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/dp/")
|
||||
@ -63,3 +30,4 @@ set(MOD_DEPS
|
||||
)
|
||||
|
||||
register_fprime_deployment()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user