From 69f5bbc1041e15691af0b4845e2136957a4846a1 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 12 Oct 2015 12:55:04 +0100 Subject: oeqa/selftest: verify that devtool can use plugins in other layers In selftest we want to exercise devtool's ability to use plugins from other layers, so add a basic command to reverse a string to meta-selftest and a test in oe-selftest to call it. Signed-off-by: Ross Burton --- meta-selftest/lib/devtool/__init__.py | 0 meta-selftest/lib/devtool/test.py | 11 +++++++++++ 2 files changed, 11 insertions(+) create mode 100644 meta-selftest/lib/devtool/__init__.py create mode 100644 meta-selftest/lib/devtool/test.py (limited to 'meta-selftest/lib') diff --git a/meta-selftest/lib/devtool/__init__.py b/meta-selftest/lib/devtool/__init__.py new file mode 100644 index 0000000000..e69de29bb2 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) -- cgit v1.2.3