Commit 310897ca authored by Greg Williams's avatar Greg Williams
Browse files

Added wait for all simulators to shutdown to stopSimulator.sh script, which is...

Added wait for all simulators to shutdown to stopSimulator.sh script, which is also used by make tasks. This is an attempt to stabilize simulator shutdown/startup.
parent df1f97ba
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ before_script:
  - sudo apt-get install -y gcc-4.8
  - if [ $CC == 'gcc' ]; then export CC=gcc-4.8; fi;
  - bundle install
script:
  - make clean
  - make start_simulator
script:
  - make all
+8 −0
Original line number Diff line number Diff line
@@ -10,5 +10,13 @@ if [[ ! -z $_SIMS ]]; then
      kill $sim
    fi
  done

  _SIMS=`ps -ef | grep "kinetic-simulator/kinetic-simulator-" | grep -v 'grep' | sed -e 's/^ *//' -e 's/ *$//' | tr -s ' ' | cut -d ' ' -f 2`
  while [[ ! -z $_SIMS ]]; do
     echo Waiting for simulators to shutdown...
     sleep 1
     _SIMS=`ps -ef | grep "kinetic-simulator/kinetic-simulator-" | grep -v 'grep' | sed -e 's/^ *//' -e 's/ *$//' | tr -s ' ' | cut -d ' ' -f 2`
  done

  echo All simulators have been terminated!
fi