From 8a636746854feb38837a45ada94ed8dd965c7efb Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Jun 2012 14:09:16 +0000 Subject: [PATCH] test.sh in test.js --- test/test.js | 6 +++++- test/test.sh | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index a62cf944..a8f6159c 100644 --- a/test/test.js +++ b/test/test.js @@ -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); diff --git a/test/test.sh b/test/test.sh index 33fccbd2..f27eec2c 100644 --- a/test/test.sh +++ b/test/test.sh @@ -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 \ No newline at end of file +./phantomjs/bin/phantomjs \ No newline at end of file