Salome HOME
Remove unnecessary trace from console.
[modules/kernel.git] / src / Launcher / Test / test_stress.sh
index 4ed5a050ccb4d01ac768cafb48e7332c1301d534..97acc5d617c1081b430707824044cfce7d2dbe0a 100755 (executable)
@@ -1,17 +1,19 @@
 #! /bin/bash
-# This test launches in parallel a greate number of instancies of a usual use case
+# This test launches in parallel a great number of instances of a usual use case
 WORKDIR=`mktemp -d`
 echo WORKDIR: $WORKDIR
 cat > $WORKDIR/command.sh <<< 'echo "OK" > result.txt'
 chmod 755 $WORKDIR/command.sh
+pid_launcher=''
 for i in {1..500}
 do
   python launcher_use_case.py $WORKDIR 2> $WORKDIR/log$i.err &
+  pid_launcher=$pid_launcher" "$!
 done
 exit_code=0
-for i in {1..500}
+for i in "$pid_launcher"
 do
-  wait -n
+  wait $i
   ret=$?
   if [ $ret -ne "0" ]
   then
@@ -21,4 +23,4 @@ do
 done
 # list of error files not empty
 ls -l $WORKDIR/*.err | awk '{if ($5 != "0") print $0}'
-exit $exit_code
\ No newline at end of file
+exit $exit_code