IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 11, 2006, 4:52:37 PM (20 years ago)
Author:
eugene
Message:

divided test macros into macros by leveltests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/test/tests.sh

    r8173 r8297  
    11
    2 $VERBOSE = 0
     2if ($?VERBOSE == 0)
     3 $VERBOSE = 0
     4end
     5
     6$failtest:n = 0
     7$failfile:n = 0
     8$faildirs:n = 0
     9$currentdir = .
    310
    411macro fulltests
     
    1623       echo "directory $testdir:$Ti"
    1724    end
    18     list testscripts -x "ls $testdir:$Ti/*.sh"
    19     for Tj 0 $testscripts:n
    20       if ($VERBOSE > 1)
    21          echo " running $testscripts:$Tj"
    22       end
    23       input $testscripts:$Tj
    24       for Tk 0 $tests:n
    25         if ($VERBOSE > 2)
    26           echo "   running $tests:$Tk"
    27         end
    28         $tests:$Tk
    29         if ($PASS == 0)
    30           echo "   ** failed test $tests:$Tk"
    31           $Nfail ++
    32           $n = $failtest:n
    33           $failtest:$n = $tests:$Tk
    34           $failfile:$n = $testscripts:$Tj
    35           $faildirs:$n = $testdir:$Ti
    36           $failtest:n ++
    37           $failfile:n ++
    38           $faildirs:n ++
    39         else
    40           $Npass ++
    41         end
    42         $Ntest ++
    43         # echo "finished $tests:$Tk"
    44       end
    45       # echo "finished $testscripts:n test scripts from $testscripts:$Tj"
    46     end
    47     # echo "finished tests from $testdir:$Ti"
     25    runtestdir $testdir:$Ti
    4826  end
    4927
     
    5432
    5533  if ($Nfail > 0)
     34    echo " ** failed tests **"
    5635    for i 0 $Nfail
    5736      echo $faildirs:$i $failfile:$i $failtest:$i
     
    6039end
    6140
     41macro runtestdir
     42  if ($0 != 2)
     43    echo "USAGE: runtestdir (testdir)"
     44    break -auto on
     45    break
     46  end
     47 
     48  pwd -var startdir
     49  cd -q $1
     50  list testscripts -x "ls *.sh"
     51
     52  $currentdir = $1
     53  for Tj 0 $testscripts:n
     54    if ($VERBOSE > 1)
     55      echo " running $testscripts:$Tj"
     56    end
     57    runtests $testscripts:$Tj     
     58  end
     59 
     60  cd -q $startdir
     61end
     62
     63macro runtests
     64  if ($0 != 2)
     65    echo "USAGE: runtests (script.sh)"
     66    break -auto on
     67    break
     68  end
     69 
     70  local Tk
     71
     72  input $1
     73  for Tk 0 $tests:n
     74    if ($VERBOSE > 2)
     75      echo "   running $tests:$Tk"
     76    end
     77    $tests:$Tk
     78    if ($PASS == 0)
     79      echo "   ** failed $tests:$Tk $1"
     80      $Nfail ++
     81      $n = $failtest:n
     82      $failtest:$n = $tests:$Tk
     83      $failfile:$n = $1
     84      $faildirs:$n = $currentdir
     85      $failtest:n ++
     86      $failfile:n ++
     87      $faildirs:n ++
     88    else
     89      $Npass ++
     90    end
     91    $Ntest ++
     92    # echo "finished $tests:$Tk"
     93  end
     94end
Note: See TracChangeset for help on using the changeset viewer.