Skip to content

Commit 144ad6a

Browse files
Further attempt to make Djna.nosys=true work on AppVeyor
1 parent 5ec31b3 commit 144ad6a

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

appveyor.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ artifacts:
2727
clone_depth: 1
2828
test_script:
2929
- dotnet restore
30-
- npm install -g selenium-standalone
31-
- selenium-standalone install
32-
- ps: Start-Process selenium-standalone 'start','-Djna.nosys=true'
30+
- npm install selenium-standalone
31+
- ps: Start-Process node './start-selenium.js'
3332
- ps: Push-Location
3433
- cd test
3534
- npm install

test/start-selenium.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
var seleniumStandalone = require('selenium-standalone');
2+
3+
var installOptions = {
4+
progressCb: function(totalLength, progressLength, chunkLength) {
5+
var percent = 100 * progressLength / totalLength;
6+
console.log('Installing selenium-standalone: ' + percent.toFixed(0) + '%');
7+
}
8+
};
9+
10+
console.log('Installing selenium-standalone...');
11+
seleniumStandalone.install(installOptions, function(err) {
12+
if (err) {
13+
throw err;
14+
}
15+
16+
var startOptions = {
17+
javaArgs: ['-Djna.nosys=true'],
18+
spawnOptions: { stdio: 'inherit' }
19+
};
20+
21+
console.log('Starting selenium-standalone...');
22+
seleniumStandalone.start(startOptions, function(err, seleniumProcess) {
23+
if (err) {
24+
throw err;
25+
}
26+
27+
console.log('Started Selenium server');
28+
29+
});
30+
});

0 commit comments

Comments
 (0)