summaryrefslogtreecommitdiff
path: root/meta-selftest/lib/devtool
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest/lib/devtool')
-rw-r--r--meta-selftest/lib/devtool/__init__.py0
-rw-r--r--meta-selftest/lib/devtool/test.py11
2 files changed, 11 insertions, 0 deletions
diff --git a/meta-selftest/lib/devtool/__init__.py b/meta-selftest/lib/devtool/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/meta-selftest/lib/devtool/__init__.py
diff --git a/meta-selftest/lib/devtool/test.py b/meta-selftest/lib/devtool/test.py
new file mode 100644
index 0000000000..b7474b5eee
--- /dev/null
+++ b/meta-selftest/lib/devtool/test.py
@@ -0,0 +1,11 @@
+import argparse
+
+def selftest_reverse(args, config, basepath, workspace):
+ """Reverse the value passed to verify the plugin is executing."""
+ print args.value[::-1]
+
+def register_commands(subparsers, context):
+ parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)',
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser_build.add_argument('value', help='Value to reverse')
+ parser_build.set_defaults(func=selftest_reverse)