~ubuntu-branches/ubuntu/raring/ibutils/raring-proposed

« back to all changes in this revision

Viewing changes to ibmgtsim/tests/osm_no_quit.check.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Benoit Mortier
  • Date: 2010-01-11 22:22:00 UTC
  • Revision ID: james.westby@ubuntu.com-20100111222200-53kum2et5nh13rv3
Tags: upstream-1.2-OFED-1.4.2
ImportĀ upstreamĀ versionĀ 1.2-OFED-1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This is the checker for for running opensm and do not exit ever
 
2
 
 
3
##############################################################################
 
4
#
 
5
# Start up the test applications
 
6
# This is the default flow that will start OpenSM only in 0x43 verbosity
 
7
# Return a list of process ids it started (to be killed on exit)
 
8
#
 
9
proc runner {simDir osmPath osmPortGuid} {
 
10
   set osmStdOutLog [file join $simDir osm.stdout.log]
 
11
   set osmLog [file join $simDir osm.log]
 
12
   puts "-I- Starting: $osmPath -g $osmPortGuid  ..."
 
13
   set osmPid [exec $osmPath -d2 -f $osmLog -g $osmPortGuid > $osmStdOutLog &]
 
14
 
 
15
   # start a tracker on the log file and process:
 
16
   startOsmLogAnalyzer $osmLog
 
17
 
 
18
   return $osmPid
 
19
}
 
20
 
 
21
##############################################################################
 
22
#
 
23
# Check for the test results
 
24
# Return the exit code
 
25
proc checker {simDir osmPath osmPortGuid} {
 
26
   set osmTestPath      [file join [file dirname $osmPath] osmtest]
 
27
   set osmTestLog       [file join $simDir osmtest.log]
 
28
   set osmTestStdOutLog [file join $simDir osmtest.stdout.log]
 
29
   set osmTestInventory [file join $simDir osmtest.dat]
 
30
 
 
31
   # wait for the SM up or dead
 
32
   set osmLog [file join $simDir osm.log]
 
33
   if {[osmWaitForUpOrDead $osmLog]} {
 
34
      return 1
 
35
   }
 
36
 
 
37
   puts "-I- Looping forever ..."
 
38
   while {1} {
 
39
      after 10000
 
40
   }
 
41
}