Skip to content

Commit f37f7f9

Browse files
Update local test script to include C++ examples and Python API
1 parent fa8a4eb commit f37f7f9

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎tooling/scripts/build_and_test_all.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ if [ "$CI" ]; then
77
flags="--no-status --force-color"
88
fi
99

10+
# Enter wavemap's home directory
11+
pushd "$(dirname "$0")/../../" >> /dev/null || exit 1
12+
13+
# Build all ROS1 packages, including the ROS examples
1014
# shellcheck disable=SC2086
1115
catkin build wavemap_all $flags
1216
# shellcheck disable=SC2086
1317
catkin build wavemap_all $flags --no-deps --catkin-make-args tests
1418

19+
# Run all ROS1 tests, which indirectly also runs the C++ API's tests
1520
pushd "$(catkin locate --devel wavemap)/../.." >> /dev/null || exit 1
1621
all_tests_passed=1
1722
for f in lib/wavemap*/test_*; do
@@ -23,3 +28,12 @@ if [ $all_tests_passed -ne 1 ]; then
2328
echo "Not all tests passed!"
2429
exit 1
2530
fi
31+
32+
# Build and test the Python API
33+
python3 -m pip install -v ./library/python/
34+
pytest -rAv ./library/python/
35+
36+
# Build the C++ examples
37+
pushd examples/cpp >> /dev/null || exit 1
38+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
39+
cmake --build build --parallel

0 commit comments

Comments
 (0)