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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [libstdc++-v3/] [scripts/] [check_compile] - Blame information for rev 20

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 20 jlechner
#!/usr/bin/env bash
2
 
3
# Script to do performance testing.
4
 
5
# Invocation
6
# check_performance SRC_DIR BUILD_DIR
7
 
8
# 1: variables
9
#
10
SRC_DIR=$1
11
BUILD_DIR=$2
12
 
13
# Now that we've successfully translated the numerical option into
14
# a symbolic one, we can safely ignore it.
15
shift
16
 
17
# This has been true all along.  Found out about it the hard way...
18
case $BASH_VERSION in
19
    1*)
20
        echo 'You need bash 2.x to run check_performance.  Exiting.';
21
        exit 1 ;;
22
    *)   ;;
23
esac
24
 
25
flags_script=$BUILD_DIR/scripts/testsuite_flags
26
INCLUDES=`$flags_script --build-includes`
27
PCH_FLAGS=`$flags_script --cxxpchflags`
28
FLAGS=`$flags_script --cxxflags`
29
TEST_FLAGS="-S"
30
COMPILER=`$flags_script --build-cxx`
31
CXX="$COMPILER $INCLUDES $PCH_FLAGS $FLAGS $TEST_FLAGS"
32
 
33
TESTS_FILE="testsuite_files"
34
 
35
#mkdir binaries
36
UNIQUE_ID=0
37
 
38
for NAME in `cat $TESTS_FILE`
39
do
40
  if $RUN; then
41
    echo $NAME
42
    OUTPUT_NAME=$UNIQUE_ID
43
    $CXX $SRC_DIR/testsuite/$NAME -o $OUTPUT_NAME
44
    if [ -f $OUTPUT_NAME ]; then
45
#       mv $OUTPUT_NAME binaries
46
        rm $OUTPUT_NAME
47
    fi
48
    echo ""
49
    let UNIQUE_ID+=1
50
  fi
51
done
52
 
53
exit 0

powered by: WebSVN 2.1.0

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