[riot-notifications] [RIOT-OS/RIOT] tests/thread_float: improve and add script (#16901)

Martine Lenders notifications at github.com
Wed Sep 29 17:45:24 CEST 2021


@miri64 commented on this pull request.



> +    assert first + delta > second
+    assert first - delta < second
+
+
+def testfunc(child):
+    child.expect_exact("THREADS CREATED")
+    child.expect_exact("THREAD t1 start")
+    child.expect_exact("THREAD t2 start")
+    child.expect_exact("THREAD t3 start")
+
+    child.expect(r"t(\d): (\d{3}\.\d+)\r\n")
+    first_thread = int(child.match.group(1))
+    # Note: intentionally keeping the float output as string to also test that printf("%f", ...)
+    # prints the exact same char sequence for the same float value each time
+    first_result = child.match.group(2)
+    child.expect(r"t(\d): (\d{3}\.\d+)")

> Just noticed that this is documented here: https://github.com/RIOT-OS/RIOT/tree/master/tests#automated-tests-guidelines

Thanks. Was too lazy to search it for https://github.com/RIOT-OS/RIOT/pull/16901#issuecomment-930280528 ^^"

-- 
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/16901#discussion_r718653371
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210929/3ac3b59e/attachment.htm>


More information about the notifications mailing list