Advertisement
Guest User

Brads Ryzen test

a guest
Sep 21st, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.27 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. TARS=/home/brad/load/tars
  4. DEST=/tmp/gcc
  5.  
  6. LOOPCOUNT=0
  7.  
  8. do_build () {
  9.     mkdir -p $DEST/work/$1 || exit 1
  10.     echo -n " "$1
  11.     pushd $1-* > /dev/null || exit 1
  12.     ./configure --prefix=$DEST/work/$1 --with-gmp=$DEST/work/gmp --with-mpfr=$DEST/work/mpfr --with-mpc=$DEST/work/mpc --disable-multilib &> configure.log || exit 1
  13.     make -j16 > $DEST/work/$1/build.log 2>&1 ; RETVAL=$?
  14.     if [ "$RETVAL" -ne 0 ] ; then
  15.         cp $DEST/work/$1/build.log /tmp/$1-build-fail-`/bin/date +%s`.log
  16.     elif [ "$1" != "gcc" ] ; then
  17.         make install >> $DEST/work/$1/build.log 2>&1 ; RETVAL=$?
  18.     fi;
  19.     popd > /dev/null
  20. }
  21.  
  22. while true ; do
  23.     while true ; do
  24.         rm -rf $DEST || exit 1
  25.         mkdir -p $DEST/work || exit 1
  26.         cd $DEST || exit 1
  27.         echo loop started at `/bin/date +"%Y-%m-%d %H:%M:%S"`
  28.         ORIGINTS=`/bin/date +%s`
  29.         echo -n Untarring
  30.         for i in $TARS/* ; do
  31.             echo -n " "`basename $i`
  32.             tar -xf $i
  33.         done;
  34.         echo
  35.         echo Building ...
  36.         LOOPCOUNT=$((LOOPCOUNT+1))
  37.         for i in gmp mpfr mpc gcc ; do
  38.             do_build $i ; [ "$RETVAL" -eq 0 ] || break
  39.         done;
  40.         [ "$RETVAL" -eq 0 ] || break
  41.         echo " -- PASS "$LOOPCOUNT took $((`/bin/date +%s`-ORIGINTS))
  42.         echo -n . >> /tmp/result
  43.     done;
  44.     echo -n f >> /tmp/result
  45.     echo " -- FAIL "$LOOPCOUNT took $((`/bin/date +%s`-ORIGINTS))
  46. done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement