Skip to content

Instantly share code, notes, and snippets.

@dpo
Created March 4, 2013 20:26
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 dpo/5085325 to your computer and use it in GitHub Desktop.
Save dpo/5085325 to your computer and use it in GitHub Desktop.
#!/bin/bash
np=4
tmpfile=`mktemp -t scalapack`
(( $# > 0 )) && execs="$@" || execs=`find . -type f -perm +111`
fmt='%12s %4s %4s\n'
printf "$fmt" "test" "fail" "skip"
for exec in ${execs[@]}
do
mpirun -np ${np} ${exec} > $tmpfile 2>&1
nfailed=`grep 'tests completed and failed' $tmpfile | awk '{print $1}'`
nskipped=`grep 'tests skipped' $tmpfile | awk '{print $1}'`
printf "$fmt" `basename ${exec}` ${nfailed} ${nskipped}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment