#!/bin/bash shellfu import jat_dump reply_md() { local case=$1 case $case in new) echo FOO echo 6 echo 7 echo hello echo joe echo sh echo just a test module echo something something ;; add) echo FOO echo y echo hello echo jane echo sh echo just another test module echo something something else else ;; esac } jat__pstartt "create module set" jat__eval "reply_md new | preupg-content-creator" jat__eval "reply_md add | preupg-content-creator" jat__eval "echo log_info Hello >> FOO/hello/joe/check" jat__eval "echo exit_pass >> FOO/hello/joe/check" jat__eval "echo log_info Bye >> FOO/hello/jane/check" jat__eval "echo exit_pass >> FOO/hello/jane/check" jat__eval "preupg-xccdf-compose FOO 1>pxc.out 2>pxc.err" jat__eval "mv FOO FOO-raw; mv FOO-results FOO" jat__pend jat__pstartt "check for specific problems" jat__eval -S 1 -h "solution key was not added (PR#328)" -b pa_pr_328 \ "find FOO -name module.ini | xargs -L1 grep -w ^solution | grep ." jat__eval -S 1 -h "no warning about solution key (PR#328)" -b pa_pr_328 \ "grep -q 'Warning: tags: .solution. are not allowed in config file' pxc.err" jat__pend jat__pstartd "diag" jat_dump__file pxc.out pxc.err jat__pend jat__pstartt "run module set" jat__cmd preupg -c FOO/all-xccdf.xml --force jat__pend