summaryrefslogtreecommitdiff
path: root/meta-selftest/lib/devtool/test.py
blob: b7474b5eeebebea9b87656236a9c6e40c3e14524 (plain)
1
2
3
4
5
6
7
8
9
10
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)