Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TravisCI build #66

Merged
merged 7 commits into from Mar 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .travis.yml
Expand Up @@ -8,6 +8,11 @@ node_js:
install:
- npm install
- npm run tsc
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq install g++-4.8 ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=g++-4.8 ; fi
script:
- npm test
- npm run tslint
12 changes: 12 additions & 0 deletions binding.gyp
Expand Up @@ -39,6 +39,18 @@
'-lutil'
]
}],
['OS=="mac"', {
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS": [
"-std=c++11",
"-stdlib=libc++"
],
"OTHER_LDFLAGS": [
"-stdlib=libc++"
],
"MACOSX_DEPLOYMENT_TARGET":"10.7"
}
}]
]
}]
}
6 changes: 5 additions & 1 deletion scripts/install.js
Expand Up @@ -4,7 +4,11 @@ const os = require('os');
const path = require('path');
const spawn = require('child_process').spawn;

spawn(os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', ['rebuild'], {
const p = spawn(os.platform() === 'win32' ? 'node-gyp.cmd' : 'node-gyp', ['rebuild'], {
cwd: path.join(__dirname, '..'),
stdio: 'inherit'
});

p.on('exit', function (code) {
process.exit(code);
});
14 changes: 12 additions & 2 deletions test/unixTerminal.test.js
Expand Up @@ -7,8 +7,18 @@ describe("UnixTerminal", function() {
describe("Constructor", function() {
it("should set a valid pts name", function() {
const term = new UnixTerminal('cmd.exe', [], {});
// Should match form from https://linux.die.net/man/4/pts
assert.ok(/^\/dev\/pts\/\d+$/.test(term.pty));
let regExp;
if (process.platform === 'linux') {
// https://linux.die.net/man/4/pts
regExp = /^\/dev\/pts\/\d+$/;
}
if (process.platform === 'darwin') {
// https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man4/pty.4.html
regExp = /^\/dev\/tty[p-sP-S][a-z0-9]+$/;
}
if (regExp) {
assert.ok(regExp.test(term.pty), '"' + term.pty + '" should match ' + regExp.toString());
}
});
});
});