Merge branch '2020-05-08-assorted-fixes'
[oweals/u-boot.git] / test / py / tests / test_ut.py
index 6c7b8dd2b30edac62e8c218e7ad5185010d6f0ad..01c2b3ffa121761adbac09e6a8f874ff52374cba 100644 (file)
@@ -22,7 +22,22 @@ def test_ut_dm_init(u_boot_console):
             fh.write(data)
 
 def test_ut(u_boot_console, ut_subtest):
-    """Execute a "ut" subtest."""
+    """Execute a "ut" subtest.
+
+    The subtests are collected in function generate_ut_subtest() from linker
+    generated lists by applying a regular expression to the lines of file
+    u-boot.sym. The list entries are created using the C macro UNIT_TEST().
+
+    Strict naming conventions have to be followed to match the regular
+    expression. Use UNIT_TEST(foo_test_bar, _flags, foo_test) for a test bar in
+    test suite foo that can be executed via command 'ut foo bar' and is
+    implemented in C function foo_test_bar().
+
+    Args:
+        u_boot_console (ConsoleBase): U-Boot console
+        ut_subtest (str): test to be executed via command ut, e.g 'foo bar' to
+            execute command 'ut foo bar'
+    """
 
     output = u_boot_console.run_command('ut ' + ut_subtest)
     assert output.endswith('Failures: 0')