IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9197


Ignore:
Timestamp:
Oct 4, 2006, 9:53:08 AM (20 years ago)
Author:
eugene
Message:

added and updated tests (esp memory checks)

Location:
trunk/Ohana/src/opihi
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/test/fprintf.sh

    r6265 r9197  
    55 test3
    66 test4
     7 test5
    78end
    89
     
    5859 end
    5960end
     61
     62# check for memory leaks
     63macro test5
     64
     65 list word -x "ps -p $PID -o rss"
     66 $startmem = $word:1
     67
     68 output /dev/null
     69 for i 0 1000
     70   fprintf "test %10s" foobar
     71 end
     72 output stdout
     73
     74 list word -x "ps -p $PID -o rss"
     75 $endmem = $word:1
     76
     77 if ("$endmem - $startmem" < 10)
     78   $PASS = 1
     79 else
     80   $PASS = 0
     81 end
     82end
  • trunk/Ohana/src/opihi/cmd.data/test/peak.sh

    r6642 r9197  
    44 test2
    55 test3
     6 test4
     7 test5
    68end
    79
     
    7476end
    7577
     78# test memory usage
     79macro test4
     80 $PASS = 1
     81 break -auto off
     82
     83 create x 0 100
     84 set y = zero (x)
     85 y[60] = 2
     86 y[50] = 1
     87 y[40] = 2
     88
     89 echo "peak:"
     90 exec ps aux | grep mana | grep -v grep
     91 for i 0 100000
     92   peak -q x y 45 55
     93 end
     94 exec ps aux | grep mana | grep -v grep
     95
     96 ## HOW do we test this?
     97end
     98
     99# test memory usage
     100macro test5
     101 $PASS = 1
     102 break -auto off
     103
     104 create x 0 100
     105 set y = zero (x)
     106 y[60] = 2
     107 y[50] = 1
     108 y[40] = 2
     109
     110 echo "peak:"
     111 exec ps aux | grep mana | grep -v grep
     112 for i 0 1000
     113   peak x y 45 55
     114 end
     115 exec ps aux | grep mana | grep -v grep
     116
     117 ## HOW do we test this?
     118end
     119
Note: See TracChangeset for help on using the changeset viewer.