test.sh in test.js

This commit is contained in:
coderaiser 2012-06-12 14:09:16 +00:00
parent 9cbbd3730e
commit 8a63674685
2 changed files with 6 additions and 3 deletions

View file

@ -2,7 +2,11 @@ var util = require('util'),
exec = require('child_process').exec,
child;
child = exec('chmod +x ./test/test.sh && ./test/test.sh',
var lScript='curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz &&' +
'tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz'+
'./phantomjs/bin/phantomjs';
child = exec(lScript,
function (error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);

View file

@ -1,5 +1,4 @@
#!/bin/sh
curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz
tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz
./phantomjs/bin/phantomjs
node test.js
./phantomjs/bin/phantomjs