[riot-notifications] [RIOT-OS/RIOT] makefiles/utils/{strings, paths}: Add function library. (#11218)

Gaƫtan Harter notifications at github.com
Wed May 8 16:52:50 CEST 2019


cladmi commented on this pull request.



>  define command_should_fail
-$1 2>/dev/null && { echo "Command '$1' should have failed but did not" >&2; $1; exit 1; } || true
+$1 2>/dev/null && { $(call fail_message,Command '$1' should have failed but did not) >&2; $1; exit 1; } || $(call ok_message,$2)

With this the test still pass:

``` diff
diff --git a/makefiles/utils/test-checks.mk b/makefiles/utils/test-checks.mk
index 3ee960cfd..f99a3d12e 100644
--- a/makefiles/utils/test-checks.mk
+++ b/makefiles/utils/test-checks.mk
@@ -4,7 +4,7 @@ test-ensure_value:
        @test "$@" = "$(call ensure_value,$@,"This should not fail")"

 test-ensure_value-negative:
-       @echo $(call ensure_value,$^,"This should fail")
+       true

 test-assert:
        @test -z "$(call assert,$@,"This should not fail")"
```

-- 
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/11218#discussion_r282103914
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190508/04224575/attachment.html>


More information about the notifications mailing list