Skip to content

Instantly share code, notes, and snippets.

@kmaglione
Created April 2, 2020 17:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmaglione/fd3e52fe890845857a9e124c607c31ee to your computer and use it in GitHub Desktop.
Save kmaglione/fd3e52fe890845857a9e124c607c31ee to your computer and use it in GitHub Desktop.
#!/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