# Our modules
from patman import control
+from patman import func_test
from patman import gitutil
from patman import project
from patman import settings
send.add_argument('patchfiles', nargs='*')
-test_parser = subparsers.add_parser('test', help='Run tests')
-test_parser.add_argument('testname', type=str, default=None, nargs='?',
- help="Specify the test to run")
+# Only add the 'test' action if the test data files are available.
+if os.path.exists(func_test.TEST_DATA_DIR):
+ test_parser = subparsers.add_parser('test', help='Run tests')
+ test_parser.add_argument('testname', type=str, default=None, nargs='?',
+ help="Specify the test to run")
status = subparsers.add_parser('status',
help='Check status of patches in patchwork')
$ tools/patman/patman test
+Note that since the test suite depends on data files only available in
+the git checkout, the `test` command is hidden unless `patman` is
+invoked from the U-Boot git repository.
+
Error handling doesn't always produce friendly error messages - e.g.
putting an incorrect tag in a commit may provide a confusing message.