Changeset a35b458 in mainline for contrib/tools/random_check.sh


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/tools/random_check.sh

    r3061bc1 ra35b458  
    8888        COUNTER=$(( $COUNTER + 1 ))
    8989        echo "Try #$COUNTER ($FAILED failed):" >&2
    90        
     90
    9191        (
    9292                echo "  Cleaning after previous build." >&2
    9393                make distclean -j$JOBS 2>&1 || exit 1
    94                
    95                
     94
     95
    9696                echo "  Preparing random configuration." >&2
    9797                # It would be nicer to allow set the constraints directly to
     
    105105                                exit 2
    106106                        fi
    107                        
     107
    108108                        make random-config 2>&1 || exit 1
    109                        
     109
    110110                        tr -d ' ' <Makefile.config >"${FILENAME_PREFIX}config.trimmed"
    111                        
     111
    112112                        THIS_CONFIG_OKAY=true
    113113                        while read pattern; do
     
    117117                                fi
    118118                        done <"$PRUNE_CONFIG_FILE"
    119                        
     119
    120120                        rm -f "${FILENAME_PREFIX}config.trimmed"
    121                        
     121
    122122                        if $THIS_CONFIG_OKAY; then
    123123                                break
    124124                        fi
    125125                done
    126                
    127                
     126
     127
    128128                # Report basic info about the configuration and build it
    129129                BASIC_CONFIG=`sed -n \
     
    134134                        | paste '-sd,' | sed 's#,#, #g'`
    135135                echo -n "  Building ($BASIC_CONFIG)... " >&2
    136        
     136
    137137                make -j$JOBS 2>&1
    138138                if [ $? -eq 0 ]; then
     
    143143                        exit 1
    144144                fi
    145                
     145
    146146        ) >random_run_$COUNTER.log
    147147        RC=$?
    148        
     148
    149149        if [ $RC -ne 0 ]; then
    150150                tail -n 10 random_run_$COUNTER.log | sed 's#.*#    | &#'
    151151                FAILED=$(( $FAILED + 1 ))
    152152        fi
    153        
     153
    154154        if [ -e Makefile.config ]; then
    155155                cp Makefile.config "$FILENAME_PREFIX$COUNTER.Makefile.config"
Note: See TracChangeset for help on using the changeset viewer.