Skip to content

Commit

Permalink
Improve test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wtetsu committed Apr 29, 2023
1 parent 182ed9e commit ae3e254
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 35 deletions.
24 changes: 12 additions & 12 deletions test/e2e/test01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ filedir=$dir/files
cd $dir
rm -f test.*.log

timeout -sKILL 5 ${gaze} -v files/*.* | tee test.log &
timeout -sKILL 6 ${gaze} -v files/*.* | tee test.log &

sleep 1.0
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.go
sleep 0.2
sleep 0.3
echo >> $filedir/hello.py
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rs
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.go
sleep 0.2
sleep 0.3
echo >> $filedir/hello.py
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rs
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.py
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rs
sleep 0.2
sleep 0.3

wait

Expand Down
22 changes: 11 additions & 11 deletions test/e2e/test02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ filedir=$dir/files
cd $dir
rm -f test.*.log

timeout -sKILL 5 ${gaze} -v -c "ruby {{file}} 1" -r files/*.* | tee test.log &
timeout -sKILL 6 ${gaze} -v -c "ruby {{file}} 1" -r files/*.* | tee test.log &

sleep 1.0
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3
echo >> $filedir/hello.rb
sleep 0.2
sleep 0.3

wait

Expand Down
24 changes: 12 additions & 12 deletions test/e2e/test03.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ cp $filedir/hello.py "$filedir/he&llo.py"
cp $filedir/hello.py "$filedir/he llo.py"
cp $filedir/hello.py "$filedir/he(llo.py"

timeout -sKILL 5 ${gaze} -v files/*.* | tee test.log &
timeout -sKILL 6 ${gaze} -v files/*.* | tee test.log &

sleep 1.0
echo >> "$filedir/he'llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he&llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he(llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he'llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he&llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he'llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he(llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he&llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he llo.py"
sleep 0.2
sleep 0.3
echo >> "$filedir/he(llo.py"

wait
Expand Down
4 changes: 4 additions & 0 deletions test/e2e/test_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ r03=$?
echo "test01.sh: $r01"
echo "test02.sh: $r02"
echo "test03.sh: $r03"

if [ $r01 -ne 0 ] || [ $r02 -ne 0 ] || [ $r03 -ne 0 ]; then
exit 1
fi

0 comments on commit ae3e254

Please sign in to comment.