]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.am (check-compile): New.
authorBenjamin Kosnik <bkoz@redhat.com>
Thu, 20 Jan 2005 20:28:41 +0000 (20:28 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 20 Jan 2005 20:28:41 +0000 (20:28 +0000)
2005-01-20  Benjamin Kosnik  <bkoz@redhat.com>

* testsuite/Makefile.am (check-compile): New.
* testsuite/Makefile.in: Regenerate.
* scripts/check_compile_time: New.
* scripts/check_performance: Tweaks.

From-SVN: r93980

libstdc++-v3/ChangeLog
libstdc++-v3/scripts/check_compile [new file with mode: 0755]
libstdc++-v3/scripts/check_performance
libstdc++-v3/testsuite/Makefile.am
libstdc++-v3/testsuite/Makefile.in

index 3dba391716fa505af4c2ddebb4317c5f7cf630e3..a357e0033312f7cbd18d5a5186153619e98021ca 100644 (file)
@@ -1,3 +1,10 @@
+2005-01-20  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * testsuite/Makefile.am (check-compile): New.
+       * testsuite/Makefile.in: Regenerate.    
+       * scripts/check_compile_time: New.
+       * scripts/check_performance: Tweaks.
+
 2005-01-19  Paolo Carlini  <pcarlini@suse.de>
 
        PR libstdc++/19535
diff --git a/libstdc++-v3/scripts/check_compile b/libstdc++-v3/scripts/check_compile
new file mode 100755 (executable)
index 0000000..e27cc33
--- /dev/null
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+
+# Script to do performance testing.
+
+# Invocation 
+# check_performance SRC_DIR BUILD_DIR
+
+# 1: variables
+#
+SRC_DIR=$1
+BUILD_DIR=$2
+
+# Now that we've successfully translated the numerical option into
+# a symbolic one, we can safely ignore it.
+shift
+
+# This has been true all along.  Found out about it the hard way...
+case $BASH_VERSION in
+    1*)  
+       echo 'You need bash 2.x to run check_performance.  Exiting.'; 
+       exit 1 ;;
+    *)   ;;  
+esac
+
+flags_script=$BUILD_DIR/scripts/testsuite_flags
+INCLUDES=`$flags_script --build-includes`
+PCH_FLAGS=`$flags_script --cxxpchflags`
+FLAGS=`$flags_script --cxxflags`
+TEST_FLAGS="-S"
+COMPILER=`$flags_script --build-cxx`
+CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS $TEST_FLAGS"
+
+TESTS_FILE="testsuite_files"
+
+for NAME in `cat $TESTS_FILE`
+do
+  if $RUN; then
+    echo $NAME
+    FILE_NAME="`basename $NAME`"
+    OUTPUT_NAME="`echo $FILE_NAME | sed 's/cc$/s/'`"
+    $CXX $SRC_DIR/testsuite/$NAME -o $OUTPUT_NAME
+    if [ -f $OUTPUT_NAME ]; then
+       rm $OUTPUT_NAME
+    fi
+    echo ""
+  fi
+done
+
+exit 0
index 090dae87ff69d1c76f4cba46e084dc7b88a8693a..b395fcb14e010e98745ab6653d6a20be7335f8fb 100755 (executable)
@@ -23,7 +23,8 @@ case $BASH_VERSION in
 esac
 
 flags_script=$BUILD_DIR/scripts/testsuite_flags
-INCLUDES="`$flags_script --build-includes` -include bits/stdc++.h"
+INCLUDES=`$flags_script --build-includes`
+PCH_FLAGS=`$flags_script --cxxpchflags`
 FLAGS=`$flags_script --cxxflags`
 THREAD_FLAG='-pthread'
 COMPILER=`$flags_script --build-cxx`
@@ -31,8 +32,8 @@ SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc \
          -Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
 ST_FLAG="-static"
 LINK=$SH_FLAG
-CXX="$COMPILER $INCLUDES $FLAGS -DNOTHREAD $LINK"
-CXX_THREAD="$COMPILER $INCLUDES $FLAGS $THREAD_FLAG $LINK"
+CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS -DNOTHREAD $LINK"
+CXX_THREAD="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS $THREAD_FLAG $LINK"
 
 
 TESTS_FILE="testsuite_files_performance"
index 371ab72e43d0aeee33fe111150a0b2eca299a5d6..1baeb826c4bbe5d592ecc5f1b76a98a6fe2a7bc1 100644 (file)
@@ -180,6 +180,12 @@ check-performance: testsuite_files_performance ${performance_script}
        -@(chmod + ${performance_script}; \
          ${performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
 
+# Runs the testsuite, but in compile only mode, and times it.
+# See script.
+compile_script=${glibcxx_srcdir}/scripts/check_compile
+check-compile: testsuite_files ${compile_script}
+       -@(chmod + ${compile_script}; \
+         ${compile_script} ${glibcxx_srcdir} ${glibcxx_builddir})
 
 # This rule generates all of the testsuite_files* lists at once.
 ${lists_of_files}:
index a3dc54fe3bdb97fd0666c0bf410adcba372bc1ee..4201ab9256de539fc991c2c279a15ae3a047825d 100644 (file)
@@ -310,6 +310,10 @@ survey_script = ${glibcxx_builddir}/scripts/check_survey
 # running this is off by default.
 performance_script = ${glibcxx_srcdir}/scripts/check_performance
 
+# Runs the testsuite, but in compile only mode, and times it.
+# See script.
+compile_script = ${glibcxx_srcdir}/scripts/check_compile
+
 # By adding these files here, automake will remove them for 'make clean'
 CLEANFILES = *.txt *.tst *.exe core* filebuf_* tmp* ostream_* *.log *.sum \
             testsuite_* site.exp abi_check baseline_symbols *TEST*
@@ -662,6 +666,9 @@ check-script-install: ${survey_script}
 check-performance: testsuite_files_performance ${performance_script}
        -@(chmod + ${performance_script}; \
          ${performance_script} ${glibcxx_srcdir} ${glibcxx_builddir})
+check-compile: testsuite_files ${compile_script}
+       -@(chmod + ${compile_script}; \
+         ${compile_script} ${glibcxx_srcdir} ${glibcxx_builddir})
 
 # This rule generates all of the testsuite_files* lists at once.
 ${lists_of_files}: