Skip to content

Commit d71db4b

Browse files
authored
Merge pull request #210 from alancutter/fix-testing
Get Travis testing again
2 parents 5cad16b + b2745c1 commit d71db4b

10 files changed

+5321
-2460
lines changed

.gitmodules

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[submodule "test/web-platform-tests"]
2-
path = test/web-platform-tests
3-
url = https://github.com/alancutter/web-platform-tests.git
4-
branch = nativeShippingAPI
2+
path = test/web-platform-tests
3+
url = https://github.com/web-platform-tests/wpt.git

.travis-setup.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ uname -a
2626
cat /etc/lsb-release
2727

2828
npm install
29+
# npm may update the package-lock.json. Revert this to avoid failing grunt-checkrepo.
30+
git checkout HEAD package-lock.json
31+
2932
npm install -g grunt-cli
3033

3134
sudo apt-get update --fix-missing
@@ -62,19 +65,19 @@ Chrome)
6265
sudo dpkg --install $CHROME || sudo apt-get -f install
6366
which google-chrome
6467
ls -l `which google-chrome`
65-
68+
6669
if [ -f /opt/google/chrome/chrome-sandbox ]; then
6770
export CHROME_SANDBOX=/opt/google/chrome/chrome-sandbox
6871
else
6972
export CHROME_SANDBOX=$(ls /opt/google/chrome*/chrome-sandbox)
7073
fi
71-
74+
7275
# Download a custom chrome-sandbox which works inside OpenVC containers (used on travis).
7376
sudo rm -f $CHROME_SANDBOX
7477
sudo wget https://googledrive.com/host/0B5VlNZ_Rvdw6NTJoZDBSVy1ZdkE -O $CHROME_SANDBOX
7578
sudo chown root:root $CHROME_SANDBOX; sudo chmod 4755 $CHROME_SANDBOX
7679
sudo md5sum $CHROME_SANDBOX
77-
80+
7881
google-chrome --version
7982
;;
8083

.travis.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1+
dist: xenial
2+
services: xvfb
13
language: node_js
2-
3-
node_js:
4-
- "6.10.2"
5-
6-
install:
7-
- BROWSER="Firefox-stable" ./.travis-setup.sh
8-
9-
before_script:
10-
- export DISPLAY=:99.0
11-
- sh -e /etc/init.d/xvfb start
4+
node_js: "10.15.3"
5+
install: BROWSER="Firefox-stable" ./.travis-setup.sh
6+
script: xvfb-run -a npm test

Gruntfile.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,9 @@ module.exports = function(grunt) {
191191
return new Promise(function(resolve) {
192192
var karmaConfig = require('karma/lib/config').parseConfig(require('path').resolve('test/karma-config.js'), {});
193193
configCallback(karmaConfig);
194-
var karmaServer = require('karma').server;
195-
karmaServer.start(karmaConfig, function(exitCode) {
194+
new (require('karma').Server)(karmaConfig, function(exitCode) {
196195
resolve(exitCode == 0);
197-
});
196+
}).start();
198197
});
199198
}
200199

0 commit comments

Comments
 (0)