Salome HOME
Add const classifier to getters to be able to use in const methods.
[modules/kernel.git] / src / Launcher / Test / test_stress.sh
1 #! /bin/bash
2 # This test launches in parallel a great number of instances of a usual use case
3 WORKDIR=`mktemp -d`
4 echo WORKDIR: $WORKDIR
5 cat > $WORKDIR/command.sh <<< 'echo "OK" > result.txt'
6 chmod 755 $WORKDIR/command.sh
7 for i in {1..500}
8 do
9   python launcher_use_case.py $WORKDIR 2> $WORKDIR/log$i.err &
10 done
11 exit_code=0
12 for i in {1..500}
13 do
14   wait -n
15   ret=$?
16   if [ $ret -ne "0" ]
17   then
18      echo "Error detected!"
19      exit_code=1
20   fi
21 done
22 # list of error files not empty
23 ls -l $WORKDIR/*.err | awk '{if ($5 != "0") print $0}'
24 exit $exit_code