Changeset 8439

Show
Ignore:
Timestamp:
07/16/10 11:28:55 (3 years ago)
Author:
bligon
Message:

Modified dbench script to rebuild the system on every execution.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Branch/test/automated/vfs-tests.d/dbench

    r8428 r8439  
    11#!/bin/sh 
    2 cd ${EXTRA_TESTS}/dbench-3.03 
     2 
     3#this script assumes that the benchmark tar file is already copied into $EXTRA_TESTS 
     4if [ ! $BENCHMARK ] 
     5then 
     6   #this is the existing name of the tar file 
     7   BENCHMARK=benchmarks-20060512.tar.gz 
     8fi 
     9 
     10#make directory, if it doesn't exist 
     11mkdir -p ${EXTRA_TESTS}/dbench-3.03 
     12 
     13#capture current working directory 
     14cwd=`pwd` 
     15 
     16#goto benchmark directory and cleanup 
     17cd ${EXTRA_TESTS} 
     18sudo /bin/rm -rf dbench-3.03 
     19 
     20#go back 
     21cd .. 
     22 
     23#untar the dbench directory 
     24tar -xzf ${BENCHMARK} benchmarks/dbench-3.03/* 
     25 
     26#goto the dbench directory 
     27cd benchmarks/dbench-3.03 
     28 
     29#configure the dbench software 
    330./configure -q 
     31 
     32#apply patches 
    433patch -p3 < ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/vfs-tests.d/dbench.patch 
    534if [ "${?}" != 0 ] 
    635then 
    736   echo "Error: failed to apply patches to DBENCH." 
     37   cd $cwd 
    838   exit 1; 
    939fi 
     40 
     41#compile the system 
    1042make 2>&1 
     43 
     44#setup dbench test and execute. 
    1145cp client.txt ${PVFS2_MOUNTPOINT} 
     46if [ $? != 0 ] 
     47then 
     48   echo "failed to copy client.txt to ${PVFS2_MOUNTPOINT}" 
     49   cd $cwd 
     50   exit 1 
     51fi 
    1252cd ${PVFS2_MOUNTPOINT} &&  ${EXTRA_TESTS}/dbench-3.03/dbench -c client.txt 10 -t 300  2>&1 
     53if [ $? != 0 ] 
     54then 
     55   echo "dbench failed" 
     56   cd $cwd 
     57   exit 1 
     58fi 
     59 
     60cd $cwd