Skip to content

Commit 4a13685

Browse files
authored
Merge pull request #129 from hmakelin/fix-github-workflow-paths
Include ROS Makefile targets in root Makefile
2 parents 800b461 + 539279b commit 4a13685

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
SHELL := /bin/bash
22

3+
# include ROS app makefile targets (test-static, test-unit, test-launch, test-sitl)
4+
include ros/gisnav/Makefile
5+
36
# Default output protocol for mock GPS messages
47
PROTOCOL=nmea
58

ros/gisnav/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
SHELL := /bin/bash
22

3+
# Get the directory of the Makefile
4+
MAKEFILE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
5+
36
# test
47
.PHONY: test-sitl
58
test-sitl:
6-
@python test/sitl/test_sitl.py px4 \
9+
@python $(MAKEFILE_DIR)test/sitl/test_sitl.py px4 \
710
|| (echo "SITL test failed, exit code: $$?"; exit 1)
811

912
.PHONY: test-launch
1013
test-launch:
11-
@launch_test test/launch/test_default_launch.py
14+
@launch_test $(MAKEFILE_DIR)test/launch/test_default_launch.py
1215

1316
.PHONY: test-unit
1417
test-unit:
15-
@python3 -m unittest discover -s test/unit -p "test_*.py"
18+
@python3 -m unittest discover -s $(MAKEFILE_DIR)test/unit -p "test_*.py"
1619

1720
.PHONY: test-static
1821
test-static:
19-
@pre-commit run --all-files
22+
@pre-commit run --all-files --config $(MAKEFILE_DIR).pre-commit-config.yaml
2023
# test end

0 commit comments

Comments
 (0)