diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 3a7589a236..d83c4f88d4 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -390,6 +390,7 @@ gettime gettimeofday getty ghprb +gitmodules gmock Gnc Gnd diff --git a/.github/workflows/autodocs.yml b/.github/workflows/autodocs.yml index 977e7cb8f5..0cc91bbc21 100644 --- a/.github/workflows/autodocs.yml +++ b/.github/workflows/autodocs.yml @@ -10,9 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: Setup Dependencies run: | diff --git a/.github/workflows/build-test-macos.yml b/.github/workflows/build-test-macos.yml index c82e1b52ab..390804dbfa 100644 --- a/.github/workflows/build-test-macos.yml +++ b/.github/workflows/build-test-macos.yml @@ -21,9 +21,10 @@ jobs: runs-on: macos-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: F prime CI step run: ./ci/tests/Framework.bash @@ -40,9 +41,10 @@ jobs: runs-on: macos-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: F prime CI step run: ./ci/tests/Ref.bash @@ -59,9 +61,10 @@ jobs: runs-on: macos-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: Install coreutils run: brew install coreutils diff --git a/.github/workflows/build-test-rpi.yml b/.github/workflows/build-test-rpi.yml index 7b3b5e0480..6476d30b86 100644 --- a/.github/workflows/build-test-rpi.yml +++ b/.github/workflows/build-test-rpi.yml @@ -23,9 +23,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: Setup RPI Toolchain uses: fprime-community/setup-rpi-sysroot@main diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0e2fab3ae6..6e3f40df19 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -21,9 +21,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: F prime CI step run: ./ci/tests/Framework.bash @@ -40,9 +41,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: F prime CI step run: ./ci/tests/Ref.bash @@ -59,9 +61,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: Setup Valgrind run: | @@ -82,9 +85,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: Setup Dependencies run: | @@ -104,9 +108,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: CMake Tests working-directory: ./cmake/test diff --git a/.github/workflows/cppcheck-scan.yml b/.github/workflows/cppcheck-scan.yml index fc847036a7..6d85692f3d 100644 --- a/.github/workflows/cppcheck-scan.yml +++ b/.github/workflows/cppcheck-scan.yml @@ -24,9 +24,10 @@ jobs: steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: Install cppcheck diff --git a/.github/workflows/cpplint-scan.yml b/.github/workflows/cpplint-scan.yml index d2a848643d..a64c7f174e 100644 --- a/.github/workflows/cpplint-scan.yml +++ b/.github/workflows/cpplint-scan.yml @@ -23,9 +23,10 @@ jobs: steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - uses: ./.github/actions/setup - name: Install cpplint diff --git a/.github/workflows/ext-raspberry-led-blinker.yml b/.github/workflows/ext-raspberry-led-blinker.yml index b7b2ca61e0..f036515aee 100644 --- a/.github/workflows/ext-raspberry-led-blinker.yml +++ b/.github/workflows/ext-raspberry-led-blinker.yml @@ -30,15 +30,15 @@ jobs: needs: get-branch steps: - name: "Checkout target repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - submodules: recursive + submodules: false repository: fprime-community/fprime-workshop-led-blinker ref: ${{ needs.get-branch.outputs.target-branch }} - name: "Overlay current F´ revision" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - submodules: recursive + submodules: true path: ./fprime fetch-depth: 0 - uses: ./fprime/.github/actions/setup diff --git a/.github/workflows/fpp-tests.yml b/.github/workflows/fpp-tests.yml index 349d58d57f..565f4eb920 100644 --- a/.github/workflows/fpp-tests.yml +++ b/.github/workflows/fpp-tests.yml @@ -17,9 +17,10 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout F´ Repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - name: "Install requirements.txt" run: | pip3 install -r ./requirements.txt diff --git a/.github/workflows/reusable-project-builder.yml b/.github/workflows/reusable-project-builder.yml index 2a9050b4e1..5f5e89f8e6 100644 --- a/.github/workflows/reusable-project-builder.yml +++ b/.github/workflows/reusable-project-builder.yml @@ -47,15 +47,15 @@ jobs: name: "Build" steps: - name: "Checkout target repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - submodules: recursive + submodules: false repository: ${{ inputs.target_repository }} ref: ${{ inputs.target_ref }} - name: "Overlay current F´ revision" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - submodules: recursive + submodules: true path: ${{ inputs.fprime_location }} - name: "Install requirements.txt" run: | @@ -78,15 +78,15 @@ jobs: name: "Unit Tests" steps: - name: "Checkout target repository" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - submodules: recursive + submodules: false repository: ${{ inputs.target_repository }} ref: ${{ inputs.target_ref }} - name: "Overlay current F´ revision" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - submodules: recursive + submodules: true path: ${{ inputs.fprime_location }} - name: "Install requirements.txt" run: | diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..8cf8b5e334 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "googletest"] + path = googletest + url = https://github.com/google/googletest.git diff --git a/Drv/Ip/CMakeLists.txt b/Drv/Ip/CMakeLists.txt index 0473c63867..aea50f3317 100644 --- a/Drv/Ip/CMakeLists.txt +++ b/Drv/Ip/CMakeLists.txt @@ -27,7 +27,7 @@ if (BUILD_TESTING) "${CMAKE_CURRENT_LIST_DIR}/test/ut/SocketTestHelper.cpp") target_include_directories(PortSelector PUBLIC "${FPRIME_FRAMEWORK_PATH}/STest" - "${FPRIME_FRAMEWORK_PATH}/gtest/googletest-src/googletest/include" + "${FPRIME_FRAMEWORK_PATH}/googletest/googletest/include" ) add_dependencies(PortSelector STest Fw_Buffer) target_link_libraries(PortSelector STest Fw_Buffer) diff --git a/cmake/FPrime.cmake b/cmake/FPrime.cmake index 0056c18b64..236c0a0c79 100644 --- a/cmake/FPrime.cmake +++ b/cmake/FPrime.cmake @@ -160,7 +160,7 @@ function(fprime_setup_included_code) setup_global_targets() # For BUILD_TESTING builds then set up libraries that support testing if (BUILD_TESTING AND NOT DEFINED FPRIME_SUB_BUILD_TARGETS) - include("${FPRIME_FRAMEWORK_PATH}/cmake/googletest-download/googletest.cmake") + add_subdirectory("${FPRIME_FRAMEWORK_PATH}/googletest/" "${CMAKE_BINARY_DIR}/F-Prime/googletest") endif() if (BUILD_TESTING) add_subdirectory("${FPRIME_FRAMEWORK_PATH}/STest/" "${CMAKE_BINARY_DIR}/F-Prime/STest") diff --git a/cmake/googletest-download/CMakeLists.txt.in b/cmake/googletest-download/CMakeLists.txt.in deleted file mode 100644 index ee3a361e13..0000000000 --- a/cmake/googletest-download/CMakeLists.txt.in +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12) - -project(googletest-download NONE) - -include(ExternalProject) -ExternalProject_Add(googletest - GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG a3460d1 - SOURCE_DIR "${FPRIME_FRAMEWORK_PATH}/gtest/googletest-src" - BINARY_DIR "${FPRIME_FRAMEWORK_PATH}/gtest/googletest-build-${TOOLCHAIN_NAME}" - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - TEST_COMMAND "" -) diff --git a/cmake/googletest-download/googletest.cmake b/cmake/googletest-download/googletest.cmake deleted file mode 100644 index 2c93b16d79..0000000000 --- a/cmake/googletest-download/googletest.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Download and unpack googletest at configure time if it doesn't exit already -if (NOT IS_DIRECTORY "${FPRIME_FRAMEWORK_PATH}/gtest/googletest-build-${TOOLCHAIN_NAME}/googletest") - configure_file("${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.in" googletest-download/CMakeLists.txt) - execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) - if(result) - message(FATAL_ERROR "CMake step for googletest failed: ${result}") - endif() - execute_process(COMMAND ${CMAKE_COMMAND} --build . - RESULT_VARIABLE result - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ) - if(result) - message(FATAL_ERROR "Build step for googletest failed: ${result}") - endif() -endif() -# Prevent overriding the parent project's compiler/linker -# settings on Windows -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - -# Add googletest directly to our build. This defines -# the gtest and gtest_main targets. -add_subdirectory(${FPRIME_FRAMEWORK_PATH}/gtest/googletest-src - ${FPRIME_FRAMEWORK_PATH}/gtest/googletest-build-${TOOLCHAIN_NAME} - EXCLUDE_FROM_ALL) - -# The gtest/gtest_main targets carry header search path -# dependencies automatically when using CMake 2.8.11 or -# later. Otherwise we have to add them here ourselves. -if (CMAKE_VERSION VERSION_LESS 2.8.11) - include_directories("${gtest_SOURCE_DIR}/include") -endif() - diff --git a/googletest b/googletest new file mode 160000 index 0000000000..58d77fa807 --- /dev/null +++ b/googletest @@ -0,0 +1 @@ +Subproject commit 58d77fa8070e8cec2dc1ed015d66b454c8d78850