X-Git-Url: https://git.llucax.com/software/mutest.git/blobdiff_plain/75eb5c4a3edb32190187334ca9238b3b1ef2be39..ab22fdd3f1e817a4ab3a05d76366f14c06dfad6d:/mkmutest?ds=sidebyside diff --git a/mkmutest b/mkmutest index c6b941b..8806987 100755 --- a/mkmutest +++ b/mkmutest @@ -1,14 +1,16 @@ #!/bin/bash - -# This file is part of mutest, a micro testing framework for C. # -# mutest is under the BOLA license, please see the LICENSE file or visit +# This file is part of mutest, a simple micro unit testing framework for C. +# +# mutest was written by Leandro Lucarella and is released +# under the BOLA license, please see the LICENSE file or visit: # http://blitiri.com.ar/p/bola/ # -# This is a simple script to generate a C file that runs all the test cases +# This is a simple script to generate a C file that runs all the test suites # present in .o files passed as arguments. # # Please, read the README file for more details. +# # the trick here is getting all the test cases present in an object file using @@ -32,7 +34,7 @@ for file in "$@" do pr_file=`echo "$file" | sed 's/\"/\\\\\"/g'` suite=`basename "$file" .o | sed 's/\"/\\\\\"/g'` - symbols=`nm -p "$file" | egrep '^[[:xdigit:]]{8} T mu_\w+$' | cut -c12-` + symbols=`nm "$file" | egrep '^[[:xdigit:]]+ T mu_\w+$' | cut -d' ' -f3` tests=`echo "$symbols" | egrep '^mu_test'` inits=`echo "$symbols" | egrep '^mu_init'` terms=`echo "$symbols" | egrep '^mu_term'`