scriptharness 0.2.0
Jun. 21st, 2015 02:13 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I've been getting some good feedback about scriptharness 0.1.0; thank you. I listed the 0.2.0 highlights and changes in the 0.2.0 Release Notes, but wanted to mention a few things here.
First, mozharness' config had the flexibility of accepting any arbitrary key/value pairs from various sources (initial_config, commandline options, config files...). However, it wasn't always clear what each config variable was for, or if it was required, or if the config was valid. I filed bug 699343 back in 2011, but didn't know how to tackle it then. I believe I have the solution now, with ConfigTemplates.
Second, 0.1.0 was definitely lacking a run_command()
and get_output_from_command()
analogs. 0.2.0 has Command
for just running+logging a command, ParsedCommand
for parsing the output of a command, and Output
for getting the output from a command, as well as run()
, parse()
, get_output()
, and get_text_output()
shortcut functions to instantiate the objects and run them for you. (Docs are here.) Each of these supports cross-platform output_timeout
s and max_timeout
s in both python 2.7 and python3, thanks to the multiprocessing module. As a bonus, I was able to add context line support to the ErrorList
s for ParsedCommand
. This was also a want since 2011.
I fleshed out some more documentation and populated the scriptharness issues with my todo list.
I think I know what I have in mind for 0.3.0, but feedback is definitely welcome!