forked from enviPath/enviPy
Current Dev State
This commit is contained in:
25
static/js/ketcher2/node_modules/chromedriver/test-driver.sh
generated
vendored
Executable file
25
static/js/ketcher2/node_modules/chromedriver/test-driver.sh
generated
vendored
Executable file
@ -0,0 +1,25 @@
|
||||
# Start ChromeDriver and make it non-blocking with ampersand
|
||||
./bin/chromedriver &
|
||||
|
||||
# Keep track of the ChromeDrivers Process ID
|
||||
TASK_PID=$!
|
||||
|
||||
# Wait for 10 seconds to give the ChromeDriver a chance to fail if there is an
|
||||
# issue.
|
||||
sleep 10
|
||||
|
||||
# ps -p Checks if the process is still running. If it is it returns 0,
|
||||
# otherwise it returns 1
|
||||
ps -p $TASK_PID > /dev/null
|
||||
TASK_RUNNING=$?
|
||||
|
||||
# Check if the process is still running by examining the exit code of ps -p
|
||||
TEST_RESULT=1
|
||||
if [ $TASK_RUNNING -eq 0 ]; then
|
||||
# Still running so return with safe exit code
|
||||
TEST_RESULT=0
|
||||
fi
|
||||
|
||||
kill $TASK_PID
|
||||
|
||||
exit $TEST_RESULT
|
||||
Reference in New Issue
Block a user