Skip to content

Commit

Permalink
Kill jre processes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Zak authored and Jonathan Zak committed Jul 24, 2024
1 parent bf09356 commit abf076c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions test/runTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ do
echo "Done running test $test. Exit code was $?"

echo "Killing jobs..."
for pid in $(ps | grep jre| awk '{print $1}')
for pid in $(ps -ef | grep jre | awk '{print $$2}' | xargs kill -9)
do
echo killing pid $pid
kill -INT $pid
Expand Down Expand Up @@ -57,12 +57,23 @@ do
echo " $num_error errored"
done

echo "Printing processes"
ps -ef

echo "Killing Manzan processes"
ps -ef | grep manzan | awk '{ print $2 }' | xargs kill -9
ps -ef | grep manzan | awk '{ print $$2 }' | xargs kill -9

echo "Printing processes"
ps -ef

echo "Getting zombie processes"
zombie_ppid=$(ps -ef | grep "<defunct>" | awk '{ print $3 }')
echo "kill -s SIGCHLD $zombie_ppid"


if [ $num_fail -ne 0 ] || [ $num_error -ne 0 ]; then
echo "Tests failed."
exit 0
exit 1
else
echo "All tests passed."
exit 0
Expand Down

0 comments on commit abf076c

Please sign in to comment.