test fixes...

This commit is contained in:
Spencer Alger
2014-03-27 18:26:42 -07:00
parent 913edeb728
commit af89a4917f
14 changed files with 9427 additions and 70 deletions

View File

@ -1,12 +1,12 @@
module.exports = spawn;
module.exports = _spawn;
var estream = require('event-stream');
var chalk = require('chalk');
var cp = require('child_process');
var spawn = require('child_process').spawn;
var path = require('path');
var root = path.resolve(__dirname, '../');
function spawn(cmd, args, opts, cb) {
function _spawn(cmd, args, opts, cb) {
opts = opts || {};
var conf = {
stdio: 'pipe'
@ -20,26 +20,26 @@ function spawn(cmd, args, opts, cb) {
}
console.log(chalk.white.bold((subdir ? subdir + ' ' : '') + '$ ') + cmd + ' ' + args.join(' '));
var proc = cp.spawn(cmd, args, opts);
var out = estream.split();
var cp = spawn(cmd, args, opts);
var split = estream.split();
if (opts.verbose) {
proc.stdout.pipe(out);
cp.stdout.pipe(split);
} else {
proc.stdout.resume();
cp.stdout.resume();
}
proc.stderr.pipe(out);
cp.stderr.pipe(split);
out
split
.pipe(estream.mapSync(function indent(line) {
return line ? ' ' + line + '\n' : '';
}))
.pipe(process.stdout);
if (typeof cb === 'function') {
proc.on('exit', cb);
cp.on('exit', cb);
}
return proc;
return cp;
}

View File

@ -48,11 +48,7 @@ if [[ "$NODE_INTEGRATION" != "0" ]]; then
group "running integration tests"
if [[ -n "$JENKINS" ]]; then
# convert TESTING_BRANCH into BRANCH_SUFFIX
if [[ $TESTING_BRANCH = 'master' ]]; then
BRANCH_SUFFIX=''
else
BRANCH_SUFFIX="_${TESTING_BRANCH//./_}"
fi
BRANCH_SUFFIX="_${TESTING_BRANCH//./_}"
# find value of ES_PORT
if [[ -n "$es_port" ]]; then

View File

@ -13,18 +13,20 @@ fi
re_nightly='^(.*)_nightly$';
re_090='^0\.90\..*$';
re_10='^1\.0\..*$';
re_1x='^1\.([0-9]+)\..*$';
if [[ "$ES_V" =~ $re_nightly ]]; then
export ES_BRANCH=${BASH_REMATCH[1]}
elif [[ "$ES_V" =~ $re_090 ]]; then
export ES_BRANCH='0.90'
export ES_RELEASE=$ES_V
elif [[ "$ES_V" =~ $re_10 ]]; then
export ES_BRANCH='1.0'
elif [[ "$ES_V" =~ $re_1x ]]; then
export ES_BRANCH="1.${BASH_REMATCH[1]}"
export ES_RELEASE=$ES_V
else
echo "unable to parse ES_V $ES_V"
exit 1
fi
echo "ES_BRANCH = $ES_BRANCH , ES_RELEASE = $ES_RELEASE"
source $HERE/ci.sh