Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
while read line
do
set -- $line
pattern="fission"
if [ $1 = D: ]
then pattern="fission && debug"
fi
test_name=$2
dir=${test_name%/*}
test=${test_name##*/}
signature="${line#* * }"
for f in ${dir}/*.ini
do
awk <$f "//; \$1 == \"[${test}]\" { print \"skip-if = ${pattern} # Crashes: ${signature}\" }" |
uniq >$f.fisnew
mv $f.fisnew $f
done
done
#!/bin/sh
while read test_name
do
dir=${test_name%/*}
test=${test_name##*/}
for f in ${dir}/*.ini
do
awk <$f >$f.fisnew "found && /^skip-if =/ { print \"skip-if = fission ||\" substr(\$0, 10); found = 0; next }; found && /^\\[/ { print \"skip-if = fission\"; found = 0; }; \$1 == \"[${test}]\" { found = 1; }; //; END { if (found) print \"skip-if = fission\" }"
mv $f.fisnew $f
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.