src/cm/scripts/test-suite/start-test-suite.sh
author ymh <ymh.work@gmail.com>
Sat, 15 Mar 2014 10:02:34 +0100
changeset 619 2528df052b6c
parent 613 a0b695aace0a
permissions -rwxr-xr-x
add safari test runner
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
575
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     1
#!/bin/bash
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
     2
613
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
     3
export CHROME_BIN=`which chromium`
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
     4
if [ -z "$CHROME_BIN" ]; then
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
     5
    export CHROME_BIN=`which chrome`
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
     6
fi
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
     7
if [[ -z "$CHROME_BIN" && $OSTYPE =~ ^darwin ]]; then
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
     8
    CHROME_BIN_BASE=`mdfind "kMDItemCFBundleIdentifier == 'com.google.Chrome'"`
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
     9
    export CHROME_BIN="$CHROME_BIN_BASE/Contents/MacOS/Google Chrome"
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    10
fi
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    11
export PHANTOMJS_BIN=`which phantomjs`
575
8ce80860c3fe Add the skeleton of the future comt test-suite
Simon Descarpentries <sid@sopinspace.com>
parents:
diff changeset
    12
613
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    13
export FIREFOX_BIN=`which firefox`
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    14
if [[ -z "$FIREFOX_BIN" && $OSTYPE =~ ^darwin ]]; then
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    15
    FIREFOX_BIN_BASE=`mdfind "kMDItemCFBundleIdentifier == 'org.mozilla.firefox'"`
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    16
    export FIREFOX_BIN="$FIREFOX_BIN_BASE/Contents/MacOS/firefox"
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    17
fi
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    18
619
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    19
export SAFARI_BIN=`which safari`
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    20
if [[ -z "$SAFARI_BIN" && $OSTYPE =~ ^darwin ]]; then
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    21
    SAFARI_BIN_BASE=`mdfind "kMDItemCFBundleIdentifier == 'com.apple.Safari'"`
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    22
    export SAFARI_BIN="$SAFARI_BIN_BASE/Contents/MacOS/safari"
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    23
fi
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    24
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    25
2528df052b6c add safari test runner
ymh <ymh.work@gmail.com>
parents: 613
diff changeset
    26
613
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    27
if [ -x ./node_modules/.bin/karma ]; then
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    28
   KARMA=./node_modules/.bin/karma
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    29
else
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    30
   KARMA=`which karma`
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    31
fi
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    32
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    33
"$KARMA" start $@
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    34
a0b695aace0a File field of Upload from file is now mandatory.
Simon Descarpentries <sid@sopinspace.com>
parents: 575
diff changeset
    35