[riot-notifications] [RIOT-OS/RIOT] make: add capability to check config for `test-with-config` (#16795)

Karl Fessel notifications at github.com
Fri Sep 3 14:09:21 CEST 2021


@kfessel commented on this pull request.



> @@ -40,17 +40,30 @@ test-as-root/available:
 	$(Q)test -n "$(strip $(TESTS_AS_ROOT))"
 
 # Tests that require specific configuration
-.PHONY: test-with-config test-with-config/available
-TESTS_WITH_CONFIG ?= $(foreach file,$(wildcard $(APPDIR)/tests-with-config/*[^~]),\
-                        $(shell test -f $(file) -a -x $(file) && echo $(file)))
+.PHONY: test-with-config test-with-config/available test-with-config/check-config
+TESTS_WITH_CONFIG ?= $(filter-out $(APPDIR)/tests-with-config/check-config%,\
+  $(foreach file,$(wildcard $(APPDIR)/tests-with-config/*[^~]),\
+     $(shell test -f $(file) -a -x $(file) && echo $(file)))\
+)
+CHECK_CONFIG ?= $(foreach file,$(wildcard $(APPDIR)/tests-with-config/check-config*[^~]),\

```suggestion
# Tests that provide a check-config file for automatic configuration check
CHECK_CONFIG ?= $(foreach file,$(wildcard $(APPDIR)/tests-with-config/check-config*[^~]),\
```

>  	$(Q) for t in $(TESTS_WITH_CONFIG); do \
 		$$t || exit 1; \
 	done
 
-test-with-config/available:
-	$(Q)test -n "$(strip $(TESTS_WITH_CONFIG))"
+test-with-config/check-config:

```suggestion
# run the automatic configuration check 
test-with-config/check-config:
```

> +			(echo "System configuration for" \
+				"tests is not available.${COLOR_RESET}"; \

```suggestion
			(echo "System configuration for" \
				"tests is not available, $$t failed.${COLOR_RESET}"; \
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16795#pullrequestreview-746016171
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210903/dc1b4025/attachment.htm>


More information about the notifications mailing list