Do not bother pulling and all that
This commit is contained in:
parent
bace7cb2ca
commit
1944bd6982
@ -67,50 +67,16 @@ function getLatestBoxVersion(callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function gitPullLatestTests(callback) {
|
||||
async.series([
|
||||
function (next) {
|
||||
if (fs.existsSync(E2E_TEST_DIR)) return next();
|
||||
debug('Cloning e2e-test repo on first run');
|
||||
shell.system('gitCloneE2E', 'git clone ' + process.env.E2E_TEST_REPO + ' e2e-test',
|
||||
{ cwd: process.env.HOME }, next);
|
||||
},
|
||||
function (next) {
|
||||
if (fs.existsSync(INSTALLER_DIR)) return next();
|
||||
debug('Cloning install repo on first run');
|
||||
shell.system('gitCloneInstaller', 'git clone ' + process.env.INSTALLER_REPO + ' installer',
|
||||
{ cwd: process.env.HOME }, next);
|
||||
},
|
||||
function (next) {
|
||||
debug('getting latest e2e-test');
|
||||
shell.system('gitFetchE2E', 'git fetch origin && git reset --hard origin/master && npm install',
|
||||
{ cwd: E2E_TEST_DIR, env: { GIT_DIR: E2E_TEST_DIR + '/.git' } }, next); // it's not clear why GIT_DIR is needed
|
||||
},
|
||||
function (next) {
|
||||
debug('getting latest installer');
|
||||
shell.system('gitFetchInstaller', 'git fetch origin && git reset --hard origin/master && npm install',
|
||||
{ cwd: INSTALLER_DIR, env: { GIT_DIR: INSTALLER_DIR + '/.git' } }, next); // it's not clear why GIT_DIR is needed
|
||||
}
|
||||
], callback);
|
||||
}
|
||||
|
||||
function runTests(latestETag, latestBoxVersion, callback) {
|
||||
var topic = util.format('box version: %s etag: %s', latestBoxVersion, latestETag);
|
||||
|
||||
debug('Running tests for %s', topic);
|
||||
|
||||
gitPullLatestTests(function (error, stdout, stderr) {
|
||||
if (error) {
|
||||
mailer.sendEndToEndTestResult(topic, stdout ? stdout.toString('utf8') : '', stderr ? stderr.toString('utf8') : '', function () { });
|
||||
return callback(error);
|
||||
}
|
||||
shell.system('e2etestrunner', 'npm test', { cwd: E2E_TEST_DIR }, function (error, stdout, stderr) {
|
||||
debug('Final test result', error);
|
||||
|
||||
shell.system('e2etestrunner', 'npm test', { cwd: E2E_TEST_DIR }, function (error, stdout, stderr) {
|
||||
debug('Final test result', error);
|
||||
|
||||
mailer.sendEndToEndTestResult(topic, stdout ? stdout.toString('utf8') : '', stderr ? stderr.toString('utf8') : '', function () { });
|
||||
return callback(error);
|
||||
});
|
||||
mailer.sendEndToEndTestResult(topic, stdout ? stdout.toString('utf8') : '', stderr ? stderr.toString('utf8') : '', function () { });
|
||||
return callback(error);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user