taskotron_result tool
AbandonedPublic

Authored by lbrabec on May 6 2016, 11:31 AM.

Details

Summary

This is example/PoC of tool for result reporting from bash. Basically a wrapper around argparse + libtaskotron.check. It takes arguments from command line are transforms them into ResultYAML, output is saved to file. If the file is used more than one time, results are appended.

Basic usage:

# code of test 1
# ... 

taskotron_result.py -f output.yml -i httpd -t docker_image -o $outcome_test1 -n some_test_1 

# code of test 2
# ...

taskotron_result.py -f output.yml -i httpd -t docker_image -o $outcome_test2 -n some_test_2

excerpt from accompanying task formula:

- bash:
    command: sh run_test.sh

- bash:
    command: cat output.yml
  export: test_output

- name: report
  resultsdb:
    results: ${test_output}
Test Plan

wip

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
lbrabec retitled this revision from to taskotron_result tool.May 6 2016, 11:31 AM
lbrabec updated this object.
lbrabec edited the test plan for this revision. (Show Details)
lbrabec added reviewers: jskladan, tflink, kparal.

looks good to me, I assume that the idea is to add this to libtaskotron?

In D842#16042, @tflink wrote:

looks good to me, I assume that the idea is to add this to libtaskotron?

Yes, it seems to be the best approach for me

jskladan accepted this revision.May 18 2016, 10:57 AM

I'd remove the -O option, as we don't really do anything with output in result yaml. Otherwise, this is fine by me

This revision is now accepted and ready to land.May 18 2016, 10:57 AM
tflink requested changes to this revision.May 30 2016, 2:56 PM

I'd like to see some more information output for --help explaining what the tool does in addition to the arguments

taskotron_result.py
53

why are you doing a truncate() here if you're appending to the existing file?

This revision now requires changes to proceed.May 30 2016, 2:56 PM
lbrabec abandoned this revision.Jun 2 2016, 12:15 PM

Moved to D879.