Skip to content

Instantly share code, notes, and snippets.

@kmaglione
Created April 2, 2020 17:19
Show Gist options
  • Save kmaglione/9a3a4ab23238dfc96d391ade9b3a5576 to your computer and use it in GitHub Desktop.
Save kmaglione/9a3a4ab23238dfc96d391ade9b3a5576 to your computer and use it in GitHub Desktop.
#!/bin/sh
while read test_name
do
dir=${test_name%/*}
test=${test_name##*/}
for f in ${dir}/*.ini
do
awk <$f "//; \$1 == \"[${test}]\" { print \"fail-if = fission\" }" |
uniq >$f.fisnew
mv $f.fisnew $f
done
done
#!/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