Skip to content

Commit 4e47ed9

Browse files
committed
backport: Fix tests #637
1 parent 5e64283 commit 4e47ed9

5 files changed

Lines changed: 23 additions & 2 deletions

File tree

.github/workflows/run-unit-tests.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ jobs:
1616
build-and-test:
1717
name: Run unit tests ${{ matrix.build_type }} build type
1818
runs-on: ubuntu-22.04
19+
container:
20+
image: rostooling/setup-ros-docker:ubuntu-jammy-latest
21+
options: --cap-add=NET_ADMIN
22+
env:
23+
USER: husarion
1924
strategy:
2025
matrix:
2126
build_type: [simulation, hardware]
@@ -27,8 +32,10 @@ jobs:
2732
- name: Checkout repository
2833
uses: actions/checkout@v4
2934

30-
- name: Setup ROS
31-
uses: ros-tooling/setup-ros@v0.7
35+
- name: Install netcat-traditional
36+
run: |
37+
apt-get update
38+
apt-get install -y netcat-traditional
3239
3340
- name: Build and test
3441
uses: ros-tooling/action-ros-ci@v0.3

husarion_ugv/hardware_deps.repos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
repositories:
2+
behaviortree_cpp:
3+
type: git
4+
url: https://github.com/BehaviorTree/BehaviorTree.CPP
5+
version: 2626fc59f82e6c5580fdd1ab48ad7b0e26583c2f
26
behaviortree_ros2:
37
type: git
48
url: https://github.com/BehaviorTree/BehaviorTree.ROS2

husarion_ugv/simulation_deps.repos

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
repositories:
2+
behaviortree_cpp:
3+
type: git
4+
url: https://github.com/BehaviorTree/BehaviorTree.CPP
5+
version: 2626fc59f82e6c5580fdd1ab48ad7b0e26583c2f
26
behaviortree_ros2:
37
type: git
48
url: https://github.com/BehaviorTree/BehaviorTree.ROS2

husarion_ugv_diagnostics/test/unit/test_filesystem.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ TEST_F(TestFilesystem, ReadFileNonExistent)
7676

7777
TEST_F(TestFilesystem, ReadFileLocked)
7878
{
79+
if (geteuid() == 0) {
80+
GTEST_SKIP() << "Skipping ReadFileLocked test when running as root (sudo), as root can always "
81+
"read the file.";
82+
}
83+
7984
const auto test_file_path = CreateTestFile(kDummyString);
8085

8186
// Change file permissions to make it unreadable

husarion_ugv_manager/package.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<test_depend>ament_index_cpp</test_depend>
3737
<test_depend>ament_lint_auto</test_depend>
3838
<test_depend>ament_lint_common</test_depend>
39+
<test_depend>iproute2</test_depend>
3940

4041
<export>
4142
<build_type>ament_cmake</build_type>

0 commit comments

Comments
 (0)