lp:~linaro-validation/lava-core/main
- Get this branch:
- bzr branch lp:~linaro-validation/lava-core/main
Branch merges
- Linaro Validation Team: Pending requested
-
Diff: 375 lines (+352/-1)2 files modifiedlava/core/main.py (+346/-0)
setup.py (+6/-1)
Branch information
Recent revisions
- 13. By Zygmunt Krynicki
-
Add lava.core.main
The .main module defines one, relatively big, lava.commands.
Dispatcher
subclass, LavaDispatcher, that is specialized for being the entry point
to all of lava form the shell. There are a number of customizations as
compared to the plain Dispatcher class.There is a custom argument parser, as produced by construct_parser(), that has
a lot of additional options for debugging and logging. There is a set of
methods that conditionally enable plain logging, verbose logging,
exception/crash logging, and developer-debug logging. Those are all called from
the private method _adjust_logging_ level() (that is a part of the Command class
API)There way commands are processed, via dispatch(), is customized to handle
various exceptions, including CommandError which is considered normal (not an
application crash) and KeyboardInterrupt (which, by default, is not producing a
backtrace). This function also knows how to spawn pdb, the python debugger, for
a post-mortem session, if requested.Lastly there is a helper method save_history_now() that exists there to work
around scratch space going away by the time the command finishes (as typically
commands manage their scratch space internally). This part could be changed so
that commands get a scratch space from the Dispatcher (and thus extend the
lifetime of temporary files long enough so that the dispatcher gets to save
global history, including any attachments, just before discarding the top-level
Scratch object) - 7. By Zygmunt Krynicki
-
Add stub Environment class
Environment is a json-document Document that wraps the entire lava
configuration. Subsequent patches will add more functionality, as needed by
other parts of core. Note: this environment will eventually replace
settings.conf from lava-server. - 6. By Zygmunt Krynicki
-
Add project support files
This is the basic set of files: setup.py, MANIFEST.in, some text files, and the
basic package structure. I've left out HACKING as I want to do some editiong on
the contents.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:lava-core