Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Creates winodws test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
justin taft committed Oct 18, 2015
1 parent 26d385a commit 9310a30
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 15 deletions.
3 changes: 2 additions & 1 deletion script/light-test.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
set LTPATH=%~dp0\..
c:\cygwin\bin\bash.exe -lc "cd '`cygpath -u $LTPATH`; ./script/light-test.sh"
echo %LTPATH
c:\cygwin\bin\bash.exe -lc "cd `cygpath -u $LTPATH`; ./script/light-test.sh"
37 changes: 23 additions & 14 deletions script/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
#!/bin/bash

echo "Checking for chromedrive"
if [ ! -f /tmp/chromedriver ]; then
ISWINDOWS=0

if [ "$(expr substr $(uname -s) 1 9)" == "CYGWIN_NT" ]; then
CHROMEDRIVER_PATH=/tmp/chromedriver.exe
ISWINDOWS=1
else
CHROMEDRIVER_PATH=/tmp/chromedriver
fi



if [ ! -f "$CHROMEDRIVER_PATH" ]; then

# from: http://stackoverflow.com/a/17072017/142317
if [ "$(uname)" == "Darwin" ]; then
URL="http://chromedriver.storage.googleapis.com/2.19/chromedriver_mac32.zip"
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
URL="http://chromedriver.storage.googleapis.com/2.19/chromedriver_linux64.zip"
elif [ "$(expr substr $(uname -s) 1 9)" == "CYGWIN_NT" ]; then
elif [ "$ISWINDOWS" == "CYGWIN_NT" ]; then
URL="http://chromedriver.storage.googleapis.com/2.19/chromedriver_win32.zip"
CHROMEDRIVER_PATH=/tmp/chromedriver.exe
else
echo "Cannot detect a supported OS."
exit 1
Expand All @@ -22,10 +31,12 @@ if [ ! -f /tmp/chromedriver ]; then
unzip /tmp/chromedriver.zip -d /tmp
fi

ls -la /tmp/chromedriver

echo "Killing all chromedrivers & starting new instance".


killall "chromedriver"
killall "chromedriver.exe"

chmod u+x $CHROMEDRIVER_PATH
$CHROMEDRIVER_PATH&
CHROME_PID = $!
Expand All @@ -42,12 +53,10 @@ echo "Killing chrome"
kill $CHROME_PID


echo "Killing java"
taskkill /F /IM java.exe
echo "Killing bash.exe"
killall bash.exe
echo "Killing bash"
killall -9 bash
echo "Bash killed"


#echo "Killing java"
#taskkill /F /IM java.exe
#echo "Killing bash.exe"
#killall bash.exe
#echo "Killing bash"
#killall -9 bash
#echo "Bash killed"

0 comments on commit 9310a30

Please sign in to comment.