diff options
author | Ross Burton <ross.burton@intel.com> | 2015-10-12 12:55:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-21 22:56:06 +0100 |
commit | e1911205816e42c071d011f2c52f471251364735 (patch) | |
tree | 4dbe94e86d3e643b29a6dd785600b44ce55872a6 /meta-selftest/lib | |
parent | b8a972839544c76e8713329f2bfb5abff92ade2c (diff) | |
download | poky-e1911205816e42c071d011f2c52f471251364735.tar.gz |
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.
(From OE-Core rev: 69f5bbc1041e15691af0b4845e2136957a4846a1)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/lib')
-rw-r--r-- | meta-selftest/lib/devtool/__init__.py | 0 | ||||
-rw-r--r-- | meta-selftest/lib/devtool/test.py | 11 |
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 @@ | |||
1 | import argparse | ||
2 | |||
3 | def selftest_reverse(args, config, basepath, workspace): | ||
4 | """Reverse the value passed to verify the plugin is executing.""" | ||
5 | print args.value[::-1] | ||
6 | |||
7 | def register_commands(subparsers, context): | ||
8 | parser_build = subparsers.add_parser('selftest-reverse', help='Reverse value (for selftest)', | ||
9 | formatter_class=argparse.ArgumentDefaultsHelpFormatter) | ||
10 | parser_build.add_argument('value', help='Value to reverse') | ||
11 | parser_build.set_defaults(func=selftest_reverse) | ||