Skip to content

Commit

Permalink
Prevent travis-multirunner to run on Mac, revert copyright year and f…
Browse files Browse the repository at this point in the history
…ix comments
  • Loading branch information
KaptenJansson committed Oct 12, 2016
1 parent 828a81b commit 9360835
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 29 deletions.
29 changes: 14 additions & 15 deletions build/get_python_test_deps.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#!/usr/bin/python

import os
import pip
import re
import sys
import urllib2
import zipfile
import pip



GAE_DOWNLOAD_URL = 'https://storage.googleapis.com/appengine-sdks/featured/'
GAE_UPDATECHECK_URL = 'https://appengine.google.com/api/updatecheck'
TEMP_DIR = 'temp/'

def _GetLatestAppEngineSdkVersion():
response = urllib2.urlopen(GAE_UPDATECHECK_URL)
Expand Down Expand Up @@ -37,42 +39,39 @@ def _Download(url, to):


def _Unzip(path, dir):
print 'Unzipping %s in %s...' % (path, os.getcwd())
print 'Unzipping %s in %s...' % (path, dir)
zip_file = zipfile.ZipFile(path)
try:
with zipfile.ZipFile(path) as zip_file:
zip_file.extractall(dir)
finally:
zip_file.close()


def Install(package):
try:
print 'Installing python package using pip: ' + package
pip.main(['install', '--user' , package])
except OSError:
print 'Could not install %s due to : %s' % package % OSError

except OSError as e:
print 'Could not install %s due to : %s' % (package, e)


def DownloadAppEngineSdkIfNecessary():
gae_sdk_version = _GetLatestAppEngineSdkVersion()
gae_sdk_file = 'google_appengine_%s.zip' % gae_sdk_version
temp_dir = 'temp/'
if not os.path.exists(temp_dir):
os.mkdir(temp_dir)
if not os.path.exists(TEMP_DIR):
os.mkdir(TEMP_DIR)

if os.path.exists(temp_dir + gae_sdk_file):
if os.path.exists(TEMP_DIR + gae_sdk_file):
print 'Already has %s, skipping' % gae_sdk_file
return

_Download(GAE_DOWNLOAD_URL + gae_sdk_file, temp_dir + gae_sdk_file)
_Unzip(temp_dir + gae_sdk_file, temp_dir)
_Download(GAE_DOWNLOAD_URL + gae_sdk_file, TEMP_DIR+ gae_sdk_file)
_Unzip(TEMP_DIR + gae_sdk_file, TEMP_DIR)


def main():
Install('requests')
Install('WebTest')
DownloadAppEngineSdkIfNecessary()
# setUpTempDir()


if __name__ == '__main__':
sys.exit(main())
13 changes: 10 additions & 3 deletions build/start-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ BINDIR=./browsers/bin
export BROWSER=${BROWSER-chrome}
export BVER=${BVER-stable}
BROWSERBIN=$BINDIR/$BROWSER-$BVER
OS="`uname`"
if [ ! -x $BROWSERBIN ]; then
echo "Installing browser"
./node_modules/travis-multirunner/setup.sh
# Travis-multirunner only supports Linux (partial mac support exists)
if [[ "$OSTYPE" =~ ^linux ]]; then
echo "Installing browser"
./node_modules/travis-multirunner/setup.sh
fi
fi
echo "Start unit tests using Karma and $BROWSER browser"
BROWSER_UPPER=$(echo "$BROWSER" | tr '[:lower:]' '[:upper:]')
export ${BROWSER_UPPER}_BIN="$BROWSERBIN"
# Only use travis-multirunner downloaded browsers on Linux.
if [[ "$OSTYPE" =~ ^linux ]]; then
export ${BROWSER_UPPER}_BIN="$BROWSERBIN"
fi

./node_modules/karma-cli/bin/karma start karma.conf.js
2 changes: 1 addition & 1 deletion src/app_engine/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Deprecated domains which we should to redirect to REDIRECT_URL.
REDIRECT_DOMAINS = [
'apprtc.appspot.com', 'apprtc.webrtc.org', 'www.appr.tc', 'localhost:8080'
'apprtc.appspot.com', 'apprtc.webrtc.org', 'www.appr.tc'
]
# URL which we should redirect to if matching in REDIRECT_DOMAINS.
REDIRECT_URL = 'https://appr.tc'
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/analytics_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/call_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/infobox_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/peerconnectionclient_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/remotewebsocket_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/roomselection_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/sdputils_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/signalingchannel_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/testpolyfills.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down
2 changes: 1 addition & 1 deletion src/web_app/js/utils_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
Expand Down

0 comments on commit 9360835

Please sign in to comment.