From d33d0e69554b21314d7d241608058d6d6ba548cd Mon Sep 17 00:00:00 2001 From: an7s <an7s@git.zephyr-software.com> Date: Tue, 6 Sep 2011 16:50:58 +0000 Subject: [PATCH] --- .gitattributes | 1 + examples/mul/generate_cprogs.sh | 7 ++++--- examples/mul/mul.shtmpl | 2 +- examples/mul/run_tests.sh | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100755 examples/mul/run_tests.sh diff --git a/.gitattributes b/.gitattributes index 84ccc7117..e9bb433c7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -148,6 +148,7 @@ examples/integerbug.c -text examples/mul/generate_cprogs.sh -text examples/mul/mul.ctmpl -text examples/mul/mul.shtmpl -text +examples/mul/run_tests.sh -text examples/overflow1.c -text examples/test1.c -text libIRDB/Makefile -text diff --git a/examples/mul/generate_cprogs.sh b/examples/mul/generate_cprogs.sh index 185c51e31..7916233bb 100755 --- a/examples/mul/generate_cprogs.sh +++ b/examples/mul/generate_cprogs.sh @@ -1,7 +1,8 @@ #!/bin/bash -#types="char short int long unsigned+char unsigned+short unsigned+int unsigned+long"; -types="char short" +types="char short int long unsigned+char unsigned+short unsigned+int unsigned+long"; +#types="char short" +#sharedlib_gccflags="-O -O2 -fomit-frame-pointer" sharedlib_gccflags="-O -O2 -fomit-frame-pointer" #types="int char" @@ -92,7 +93,7 @@ create_prog() for gccflag in $sharedlib_gccflags do - create_test $progname_c "" "$gccflag" shared_lib + create_test $progname "" "$gccflag" shared_lib done } diff --git a/examples/mul/mul.shtmpl b/examples/mul/mul.shtmpl index b404df783..3e258bc6a 100755 --- a/examples/mul/mul.shtmpl +++ b/examples/mul/mul.shtmpl @@ -64,7 +64,7 @@ assert_test_env $outfile STRATAFIER STRATA TOOLCHAIN STRATAFIER_OBJCOPY IDAROOT # path to source testloc=`pwd` -orig=orig$$.exe +orig=$BENCHNAME.$$.exe # compile gcc ${testloc}/$BENCHNAME.c $COMPFLAGS -o $orig || cleanup 2 "gcc failed" diff --git a/examples/mul/run_tests.sh b/examples/mul/run_tests.sh new file mode 100755 index 000000000..f2b56c0f9 --- /dev/null +++ b/examples/mul/run_tests.sh @@ -0,0 +1,15 @@ +outfile=tests.out + +rm $outfile +touch $outfile + +for i in `ls mul*.sh` +do + echo running $i + $TEST_HARNESS_HOME/run_one_test.sh $i no_redirect + if [ ! $? -eq 0 ]; then + echo Test $i failed >> $outfile + else + echo Test $i success >> $outfile + fi +done -- GitLab