Changeset e36a1c2 in mainline for contrib/tools/random_check.sh
- Timestamp:
- 2014-04-24T07:42:29Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b065c9
- Parents:
- 566da7f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/tools/random_check.sh
r566da7f8 re36a1c2 29 29 # 30 30 31 LOOPS="$1" 32 PARALLELISM="$2" 33 COMPILERS="$3" 34 [ -z "$LOOPS" ] && LOOPS=1 35 [ -z "$PARALLELISM" ] && PARALLELISM=1 36 # By default, skip icc and native GCC 37 [ -z "$COMPILERS" ] && COMPILERS="gcc_cross gcc_helenos clang" 31 32 LOOPS=1 33 JOBS=1 34 MAX_RETRIES=20 35 FILENAME_PREFIX=random_run_ 36 PRUNE_CONFIG_FILE=${FILENAME_PREFIX}prune.config 37 38 echo -n "">"$PRUNE_CONFIG_FILE" 39 40 while getopts n:j:x: option; do 41 case $option in 42 n) 43 LOOPS="$OPTARG" 44 ;; 45 j) 46 JOBS="$OPTARG" 47 ;; 48 x) 49 echo "$OPTARG" | tr -d ' ' >>"$PRUNE_CONFIG_FILE" 50 ;; 51 *) 52 echo "Usage: $0 [-n loops] [-j paralellism] [-x excluded option [-x ...]]" 53 exit 1 54 ;; 55 esac 56 done 57 38 58 39 59 COUNTER=0 … … 51 71 # It would be nicer to allow set the constraints directly to 52 72 # the tools/config.py script but this usually works. 53 # We retry several times if the compiler is wrong and abort if 54 # we do not succeed after many attempts. 73 # We retry $MAX_RETRIES before aborting this run completely. 55 74 RETRIES=0 56 75 while true; do … … 63 82 make random-config 2>&1 || exit 1 64 83 65 CC=`sed -n 's#^COMPILER = \(.*\)#\1#p' <Makefile.config` 66 if echo " $COMPILERS " | grep -q " $CC "; then 84 tr -d ' ' <Makefile.config >"${FILENAME_PREFIX}config.trimmed" 85 86 THIS_CONFIG_OKAY=true 87 while read pattern; do 88 if grep -q -e "$pattern" "${FILENAME_PREFIX}config.trimmed"; then 89 THIS_CONFIG_OKAY=false 90 break 91 fi 92 done <"$PRUNE_CONFIG_FILE" 93 94 rm -f "${FILENAME_PREFIX}config.trimmed" 95 96 if $THIS_CONFIG_OKAY; then 67 97 break 68 98 fi … … 97 127 98 128 if [ -e Makefile.config ]; then 99 cp Makefile.config random_run_$COUNTER.Makefile.config100 cp config.h random_run_$COUNTER.config.h129 cp Makefile.config "$FILENAME_PREFIX$COUNTER.Makefile.config" 130 cp config.h "$FILENAME_PREFIX$COUNTER.config.h" 101 131 fi 102 132 done 103 133 134 rm "$PRUNE_CONFIG_FILE" 104 135 105 136 echo "Out of $LOOPS tries, $FAILED configurations failed to compile." >&2
Note:
See TracChangeset
for help on using the changeset viewer.