logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: [PATCH 7/12] Crucible patches from ILM: msg#00061

Subject: Re: [PATCH 7/12] Crucible patches from ILM
Adding the SUT dir was added to handle (seemingly) bad/improper handling 
of adding a test run without the SUT dir/contents existing already.  It 
seemed to balk and then not recover properly if the test was handled and 
the SUT files weren't in place.  It may _not_ be correct to auto-create 
the SUT dir, but I'm not sure it's functioning OK in the event that it 
doesn't exist...  I can handle creation of this with an external script 
if necessary, alternately if there's a way to recover from launching the 
test run without SUT/RUN_ID in place, I may have just missed it ;)

In the config sourcing, I set TARGET_DIR as the location where the SUT 
will unpack/build/run its tests in.  I use this, and envision it for the 
use, of being able to exec/run from local disk (if possible) rather than 
over the NFS partitions the base of Crucible is sourced from.  IIRC, the 
default was /usr/src hard-coded in one of the scripts.


Thanks,


/eli






Bryce Harrington wrote:
> Added the config file handling, and the improved syntax for printing
> date.  I'm not certain about the safety of having it add suts
> automatically, and didn't understand why it is creating TARGET_DIR, so
> left those out for now.
> 
> Bryce
> 
> On Wed, Sep 13, 2006 at 12:33:53PM -0700, Bryce Harrington wrote:
>  > --- ../../crucible/scripts/sut_dispatcher     2006-07-31 
> 18:00:40.000000000 -0700
>  > +++ sut_dispatcher    2006-09-06 10:58:45.000000000 -0700
>  > @@ -24,6 +24,9 @@
>  >  # FINISHED directory.  If a command exits with an error code,
>  >  # an error handling script is triggered if one exists.
>  > 
>  > +### ELI: added to make work properly:
>  > +[ -f /san/dept/srd/benchmarks/pkg/CRUCIBLE/local.cfg ] && . 
> /san/dept/srd/benchmarks/pkg/CRUCIBLE/local.cfg
>  > +
>  > 
>  >  sut_id=${SUT_ID:-`hostname --short`}
>  >  err_delay=${ERR_DELAY:-10}
>  > @@ -39,10 +42,12 @@
>  >      exit -1
>  >  fi
>  > 
>  > +echo -e "// STARTING sut_dispatcher on host ($sut_id), 
> \nbase_dir($base_dir),\nall_runs_dir($all_runs_dir),\nall_suts_dir($all_suts_dir),\nsut_dir($sut_dir)
>  
> "
>  > +
>  >  sleep_unless_exists() {
>  >      if [ ! -e "$1" ]; then
>  > -        echo "Warning:  '$1' does not exist" >&2
>  > -        echo "          (Will try again in $err_delay sec)" >&2
>  > +        echo "// Warning:  '$1' does not exist" >&2
>  > +        echo "// Will try again in $err_delay sec " >&2
>  >          sleep $err_delay
>  >          return -1
>  >      else
>  > @@ -50,24 +55,38 @@
>  >      fi
>  >  }
>  > 
>  > -echo -n "Starting up on $sut_id at "
>  > -date
>  > +echo "Starting up on $sut_id at `date` "
>  > +
>  > +### add SUT if it doesn't already exist:
>  > +sut_add
>  > +### create TARGET_DIR if it doesn't exist:
>  > +[ -d ${TARGET_DIR} ] || mkdir -p ${TARGET_DIR}
>  > 
>  >  while :; do
>  >      sleep 1
>  > 
>  >      # Verify required directories exist
>  > +    #echo "RUNNING sleep_unless_exists on (base_dir) "
>  >      sleep_unless_exists $base_dir           || continue
>  > +    #echo "RUNNING sleep_unless_exists on (all_suts_dir) "
>  >      sleep_unless_exists $all_suts_dir       || continue
>  > +    #echo "RUNNING sleep_unless_exists on (all_runs_dir) "
>  >      sleep_unless_exists $all_runs_dir       || continue
>  > +    #echo "RUNNING sleep_unless_exists on (sut_dir) "
>  >      sleep_unless_exists $sut_dir            || continue
>  > 
>  >      # Determine our current run ID
>  >      sleep_unless_exists "$sut_dir/RUN_ID"   || continue
>  >      run_id=`tail -n 1 $sut_dir/RUN_ID`
>  > 
>  > +    # ELI: make sure RUN_ID is numeric, else we haven't started on a 
> run yet...
>  > +    [ "x${run_id}" == "x" ] && echo "// RUN_ID is empty, host hasn't 
> run... exiting loop "
>  > +    [ "x${run_id}" == "x" ] && continue
>  > +
>  > +
>  >      # Ensure our run directory & subdirs exists
>  >      run_dir="$all_runs_dir/$run_id"
>  > +    echo "RUNNING sleep_unless_exists on (run_dir) "
>  >      sleep_unless_exists "$run_dir"          || continue
>  > 
>  >      # Skip this run if it's finished
>  > @@ -81,8 +100,11 @@
>  >          mv "$run_dir/INCOMING/default" "$run_dir/INCOMING/$sut_id"
>  > 
>  >      # Determine if we have a pending command
>  > +    echo "RUNNING sleep_unless_exists on ($run_dir/INCOMING/$sut_id) "
>  >      sleep_unless_exists "$run_dir/INCOMING/$sut_id" || continue
>  > +    echo "RUNNING sleep_unless_exists on ($run_dir/RUNNING/$sut_id) "
>  >      sleep_unless_exists "$run_dir/RUNNING/$sut_id"  || continue
>  > +    echo "RUNNING sleep_unless_exists on ($run_dir/FINISHED/$sut_id) "
>  >      sleep_unless_exists "$run_dir/FINISHED/$sut_id" || continue
>  > 
>  >      # touch run_profile.txt at start of run to give accurate start time
>  >
>  > -------------------------------------------------------------------------
>  > Using Tomcat but need to do more? Need to support web services, security?
>  > Get stuff done quickly with pre-integrated technology to make your 
> job easier
>  > Download IBM WebSphere Application Server v.1.0.1 based on Apache 
> Geronimo
>  > 
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 
> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
>  > _______________________________________________
>  > Crucible-devel mailing list
>  > Crucible-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
>  > https://lists.sourceforge.net/lists/listinfo/crucible-devel
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV 
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
> _______________________________________________
> Crucible-devel mailing list
> Crucible-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/crucible-devel
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>