You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

buildAndRun 624B

12345678910111213141516171819202122232425262728293031
  1. if [ "$(uname --operating-system)" == "Msys" ]
  2. then
  3. CFLAGS='-I.. -std=c++11 -g -O0 -DWIN32 -pthread'
  4. else
  5. CFLAGS='-I.. -std=c++0x -g -O0 -pthread'
  6. fi
  7. g++ $CFLAGS serviceProgram.cpp ../CodeDweller/service.cpp -o serviceProgram
  8. if [ $? -ne 0 ]
  9. then
  10. exit -1
  11. fi
  12. # Run test.
  13. logFileName=serviceProgram.log
  14. rm -f $logFileName
  15. ./serviceProgram $(pwd)/$logFileName
  16. PID=$(ps axl | grep -i serviceProgram |grep -v grep | cut -d ' ' -f 4)
  17. sleep 1
  18. kill -TERM $PID
  19. sleep 1
  20. if cmp expected_$logFileName $logFileName
  21. then
  22. echo CodeDweller::Service under Linux: ok
  23. else
  24. echo CodeDweller::Service under Linux: fail
  25. fi