1234567891011121314151617181920212223242526272829303132333435363738394041 |
- if [ "$(uname --operating-system)" == "Msys" ]
- then
- CFLAGS='-I.. -std=c++11 -g -O0 -DWIN32 -pthread'
- else
- CFLAGS='-I.. -std=c++0x -g -O0 -pthread'
- fi
-
- g++ $CFLAGS serviceProgram.cpp ../CodeDweller/service.cpp -o serviceProgram
- if [ $? -ne 0 ]
- then
- exit -1
- fi
-
- # Run test.
- logFileName=serviceProgram.log
-
- rm -f $logFileName
-
- ./serviceProgram $(pwd)/$logFileName
-
- PID=$(ps axl | grep -i serviceProgram |grep -v grep | cut -d ' ' -f 4)
- sleep 1
-
- kill -TSTP $PID
- sleep 2
-
- kill -CONT $PID
- sleep 2
-
- kill -HUP $PID
- sleep 2
-
- kill -TERM $PID
- sleep 1
-
- if cmp expected_$logFileName $logFileName
- then
- echo CodeDweller::Service under Linux: ok
- else
- echo CodeDweller::Service under Linux: fail
- fi
|