Skip to content

Commit 325f593

Browse files
committed
Enable SUnit testing on Travis CI
1 parent 45bc357 commit 325f593

File tree

6 files changed

+57
-9
lines changed

6 files changed

+57
-9
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
tests/node_modules
2+
tests/**/*.image
3+
tests/**/*.changes
4+
tests/**/*.sources
5+
tests/**/*.tgz

.travis.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: node_js
2+
node_js:
3+
- "6"
4+
before_install:
5+
- export CHROME_URL=https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64
6+
- export CHROME_REV=$(curl -s ${CHROME_URL}/LAST_CHANGE)
7+
- curl ${CHROME_URL}/${CHROME_REV}/chrome-linux.zip --create-dirs -o out/chrome-linux.zip
8+
- unzip -q out/chrome-linux.zip -d out
9+
- export CHROME_CANARY_BIN=$PWD/out/chrome-linux/chrome
10+
- export DISPLAY=:99.0
11+
- sh -e /etc/init.d/xvfb start
12+
install:
13+
- cd tests
14+
- npm install
15+
before_script:
16+
- curl -f -s -L --retry 3 -o Squeak-5.1.tgz https://dl.bintray.com/squeakjs/testing/Squeak-5.1.tgz
17+
- tar xzf Squeak-5.1.tgz -C ./resources
18+
script: npm test
19+
cache:
20+
directories:
21+
- tests/node_modules

tests/karma.conf.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,26 @@ module.exports = function(config) {
6363
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
6464
browsers: ['Chrome'],
6565

66+
customLaunchers: {
67+
ChromeCanary_Travis_CI: {
68+
base: 'ChromeCanary',
69+
flags: ['--no-sandbox']
70+
},
71+
},
72+
6673

6774
// Continuous Integration mode
6875
// if true, Karma captures browsers, runs the tests and exits
6976
singleRun: true,
7077

7178
// Concurrency level
7279
// how many browser should be started simultaneous
73-
concurrency: Infinity
74-
})
75-
}
80+
concurrency: Infinity,
81+
82+
browserDisconnectTimeout: 60000,
83+
browserNoActivityTimeout: 60000
84+
});
85+
if (process.env.TRAVIS) {
86+
config.browsers = ['ChromeCanary_Travis_CI'];
87+
}
88+
};

tests/resources/tests.st

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
FileStream stdout converter: UTF8TextConverter new.
2-
FileStream stdout nextPutAll: 'Hi'; cr.
3-
SmalltalkCI test: 'tests.ston'.
4-
FileStream stdout nextPutAll: 'Bye'; cr.
2+
SqueakJSTesting test: 'tests.ston'.
53
Smalltalk quitPrimitive

tests/resources/tests.ston

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
SmalltalkCISpec {
22
#loading : [],
33
#testing : {
4-
#classes : [ #ArrayTest, #CollectionTest ]
4+
#include : {
5+
#classes : [
6+
#BasicBehaviorClassMetaclassTest,
7+
#CollectionTest, #ArrayTest,
8+
#LinkedListTest, #OrderedCollectionTest,
9+
#OrderedDictionaryTest, #SequenceableCollectionTest,
10+
#SortedCollectionTest,
11+
#StackTest,
12+
#CharacterTest, #SymbolTest,
13+
#BagTest, #SetTest
14+
]
15+
}
516
}
617
}

tests/tests.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ __karma__.start = function() {
77
SqueakJS.runSqueak(null, canvas, {
88
appName: 'SqueakJS Tests',
99
url: 'base/tests/resources/',
10-
files: ['test.image', 'test.changes', 'SqueakV41.sources', 'tests.ston'],
10+
files: ['test.image', 'test.changes', 'SqueakV50.sources', 'tests.ston'],
1111
document: 'tests.st',
1212
forceDownload: true,
1313
onQuit: function() {
1414
__karma__.complete();
1515
},
1616
});
17-
}
17+
};

0 commit comments

Comments
 (0)