diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-01 10:27:11 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-03-12 22:51:39 -0400 |
commit | 6e60e8b2b2bab889379b380a28a167a0edd9d1d3 (patch) | |
tree | f12f54d5ba8e74e67e5fad3651a1e125bb8f4191 /import-layers/yocto-poky/meta-selftest/lib/recipetool/bbpath.py | |
parent | 509842add85b53e13164c1569a1fd43d5b8d91c5 (diff) | |
download | talos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.tar.gz talos-openbmc-6e60e8b2b2bab889379b380a28a167a0edd9d1d3.zip |
Yocto 2.3
Move OpenBMC to Yocto 2.3(pyro).
Tested: Built and verified Witherspoon and Palmetto images
Change-Id: I50744030e771f4850afc2a93a10d3507e76d36bc
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Resolves: openbmc/openbmc#2461
Diffstat (limited to 'import-layers/yocto-poky/meta-selftest/lib/recipetool/bbpath.py')
-rw-r--r-- | import-layers/yocto-poky/meta-selftest/lib/recipetool/bbpath.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta-selftest/lib/recipetool/bbpath.py b/import-layers/yocto-poky/meta-selftest/lib/recipetool/bbpath.py new file mode 100644 index 000000000..783b2dc76 --- /dev/null +++ b/import-layers/yocto-poky/meta-selftest/lib/recipetool/bbpath.py @@ -0,0 +1,41 @@ +import argparse + +already_loaded = False +register_count = 0 + +def plugin_name(filename): + return os.path.splitext(os.path.basename(filename))[0] + +def plugin_init(plugins): + global already_loaded + already_loaded = plugin_name(__file__) in (plugin_name(p.__name__) for p in plugins) + +def print_name(opts): + print (__file__) + +def print_bbdir(opts): + print (__file__.replace('/lib/recipetool/bbpath.py','')) + +def print_registered(opts): + #global kept_context + #print(kept_context.loaded) + print ("1") + +def multiloaded(opts): + global already_loaded + print("yes" if already_loaded else "no") + +def register_commands(subparsers): + global register_count + register_count += 1 + + def addparser(name, helptxt, func): + parser = subparsers.add_parser(name, help=helptxt, + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.set_defaults(func=func) + return parser + + addparser('pluginfile', 'Print the filename of this plugin', print_name) + addparser('bbdir', 'Print the BBPATH directory of this plugin', print_bbdir) + addparser('count', 'How many times have this plugin been registered.', print_registered) + addparser('multiloaded', 'How many times have this plugin been initialized', multiloaded) |