OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libstdc++-v3/] [scripts/] [check_compile] - Diff between revs 816 and 826

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 816 Rev 826
#!/usr/bin/env bash
#!/usr/bin/env bash
# Script to do performance testing.
# Script to do performance testing.
# Invocation
# Invocation
# check_performance SRC_DIR BUILD_DIR
# check_performance SRC_DIR BUILD_DIR
# 1: variables
# 1: variables
#
#
SRC_DIR=$1
SRC_DIR=$1
BUILD_DIR=$2
BUILD_DIR=$2
# Now that we've successfully translated the numerical option into
# Now that we've successfully translated the numerical option into
# a symbolic one, we can safely ignore it.
# a symbolic one, we can safely ignore it.
shift
shift
# This has been true all along.  Found out about it the hard way...
# This has been true all along.  Found out about it the hard way...
case $BASH_VERSION in
case $BASH_VERSION in
    1*)
    1*)
        echo 'You need bash 2.x to run check_performance.  Exiting.';
        echo 'You need bash 2.x to run check_performance.  Exiting.';
        exit 1 ;;
        exit 1 ;;
    *)   ;;
    *)   ;;
esac
esac
flags_script=$BUILD_DIR/scripts/testsuite_flags
flags_script=$BUILD_DIR/scripts/testsuite_flags
INCLUDES=`$flags_script --build-includes`
INCLUDES=`$flags_script --build-includes`
PCH_FLAGS=`$flags_script --cxxpchflags`
PCH_FLAGS=`$flags_script --cxxpchflags`
FLAGS=`$flags_script --cxxflags`
FLAGS=`$flags_script --cxxflags`
TEST_FLAGS="-S"
TEST_FLAGS="-S"
COMPILER=`$flags_script --build-cxx`
COMPILER=`$flags_script --build-cxx`
CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS -Wfatal-errors $TEST_FLAGS"
CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS -Wfatal-errors $TEST_FLAGS"
echo "compile line is:"
echo "compile line is:"
echo $CXX
echo $CXX
echo ""
echo ""
TESTS_FILE="testsuite_files"
TESTS_FILE="testsuite_files"
#mkdir binaries
#mkdir binaries
UNIQUE_ID=0
UNIQUE_ID=0
for NAME in `cat $TESTS_FILE`
for NAME in `cat $TESTS_FILE`
do
do
  if $RUN; then
  if $RUN; then
    echo $NAME
    echo $NAME
    OUTPUT_NAME=$UNIQUE_ID
    OUTPUT_NAME=$UNIQUE_ID
    $CXX $SRC_DIR/testsuite/$NAME -o $OUTPUT_NAME
    $CXX $SRC_DIR/testsuite/$NAME -o $OUTPUT_NAME
    if [ -f $OUTPUT_NAME ]; then
    if [ -f $OUTPUT_NAME ]; then
#       mv $OUTPUT_NAME binaries
#       mv $OUTPUT_NAME binaries
        rm $OUTPUT_NAME
        rm $OUTPUT_NAME
    fi
    fi
    let UNIQUE_ID+=1
    let UNIQUE_ID+=1
  fi
  fi
done
done
exit 0
exit 0
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.