Skip to content

Commit

Permalink
Update local test script to include C++ examples and Python API
Browse files Browse the repository at this point in the history
  • Loading branch information
victorreijgwart committed Dec 12, 2024
1 parent fa8a4eb commit f37f7f9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tooling/scripts/build_and_test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ if [ "$CI" ]; then
flags="--no-status --force-color"
fi

# Enter wavemap's home directory
pushd "$(dirname "$0")/../../" >> /dev/null || exit 1

# Build all ROS1 packages, including the ROS examples
# shellcheck disable=SC2086
catkin build wavemap_all $flags
# shellcheck disable=SC2086
catkin build wavemap_all $flags --no-deps --catkin-make-args tests

# Run all ROS1 tests, which indirectly also runs the C++ API's tests
pushd "$(catkin locate --devel wavemap)/../.." >> /dev/null || exit 1
all_tests_passed=1
for f in lib/wavemap*/test_*; do
Expand All @@ -23,3 +28,12 @@ if [ $all_tests_passed -ne 1 ]; then
echo "Not all tests passed!"
exit 1
fi

# Build and test the Python API
python3 -m pip install -v ./library/python/
pytest -rAv ./library/python/

# Build the C++ examples
pushd examples/cpp >> /dev/null || exit 1
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel

0 comments on commit f37f7f9

Please sign in to comment.