Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GoogleTest as a submodule #2371

Merged
merged 6 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ gettime
gettimeofday
getty
ghprb
gitmodules
gmock
Gnc
Gnd
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/autodocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/build-test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-test-rpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cppcheck-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cpplint-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ext-raspberry-led-blinker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/fpp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/reusable-project-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "googletest"]
path = googletest
url = https://github.com/google/googletest.git
2 changes: 1 addition & 1 deletion Drv/Ip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FPrime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
15 changes: 0 additions & 15 deletions cmake/googletest-download/CMakeLists.txt.in

This file was deleted.

33 changes: 0 additions & 33 deletions cmake/googletest-download/googletest.cmake

This file was deleted.

1 change: 1 addition & 0 deletions googletest
Submodule googletest added at 58d77f