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}
why are you doing a truncate() here if you're appending to the existing file?