[Pcre-svn] [1317] code/trunk/maint/ManyConfigTests: Add a co…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [1317] code/trunk/maint/ManyConfigTests: Add a count to show progress, suppress compiler optimization to save time.
Revision: 1317
          http://vcs.pcre.org/viewvc?view=rev&revision=1317
Author:   ph10
Date:     2013-05-01 17:00:37 +0100 (Wed, 01 May 2013)


Log Message:
-----------
Add a count to show progress, suppress compiler optimization to save time.

Modified Paths:
--------------
    code/trunk/maint/ManyConfigTests


Modified: code/trunk/maint/ManyConfigTests
===================================================================
--- code/trunk/maint/ManyConfigTests    2013-04-28 08:54:42 UTC (rev 1316)
+++ code/trunk/maint/ManyConfigTests    2013-05-01 16:00:37 UTC (rev 1317)
@@ -23,22 +23,30 @@


tmp=/tmp/pcretesting

+# Don't bother with compiler optimization; it just slows down compilation a lot
+# (and these tests themselves are quick).

+CFLAGS="-g -O0"
+
+
# This function runs a single test with the set of configuration options that
# are in $opts. The source directory must be set in srcdir.

function runtest()
{
rm -f *_unittest
+ testcount=`expr $testcount + 1`

   if [ "$opts" = "" ] ; then
-    echo "Configuring with: default settings"
+    echo "[$testcount/$testtotal] Configuring with: default settings"
   else
-    echo "Configuring with:"
+    echo "[$testcount/$testtotal] Configuring with:"
     echo "  $opts"
   fi


-  $srcdir/configure $opts >/dev/null 2>teststderr
+  CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" \
+    $srcdir/configure $opts >/dev/null 2>teststderr
+     
   if [ $? -ne 0 ]; then
     echo " "
     echo "**** Error while configuring ****"
@@ -141,6 +149,12 @@
 cvalgrind=
 withvalgrind=


+# Update the total count whenever a new test is added; it is used to show
+# progess as each test is run.
+
+testtotal=41
+testcount=0
+
echo "Tests in the current directory"
srcdir=.
for opts in \