forked from Temasys/SkylinkJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·58 lines (56 loc) · 1.18 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
grunt jshint;
type="$1";
param="$2";
#Detect the type of test to run
function get_test () {
case "$type" in
test)
echo "Running test '$param'..";
case "$param" in
event)
browserify tests/events-test.js | testling -x "$1";
;;
webrtc)
browserify tests/webrtc-test.js | testling -x "$1";
;;
*)
echo "Test '$param' not found.";
esac
;;
bot)
echo "Running bot for test '$param'..";
case "$param" in
webrtc)
browserify tests/webrtc-bot.js | testling -x "$1";
;;
*)
echo "Bot '$param' not found.";
esac
;;
*)
echo "Command '$type' not found.";
esac
}
#Detect the platform (similar to $OSTYPE)
OS="`uname`"
case $OS in
'Linux')
OS='Linux'
get_test "google-chrome ";
;;
'FreeBSD')
OS='FreeBSD'
alias ls='ls -G'
get_test "google-chrome ";
;;
'MINGW32_NT-6.1')
OS='Windows'
get_test "'C:/Program Files/Google/Chrome/Application/chrome.exe'";
;;
'Darwin')
OS='Mac'
get_test "open -a /Applications/Google\ Chrome.app";
;;
'AIX') ;;
*) echo "OS $OS not recognized";;
esac