diff --git a/e2etestrunner.js b/e2etestrunner.js index 38a5388..0975370 100755 --- a/e2etestrunner.js +++ b/e2etestrunner.js @@ -4,10 +4,7 @@ require('supererror')({ splatchError: true }); -var async = require('async'), - debug = require('debug')('e2e:runner'), - fs = require('fs'), - path = require('path'), +var debug = require('debug')('e2e:runner'), shell = require('./shell.js'), semver = require('semver'), mailer = require('./mailer.js'), @@ -17,7 +14,7 @@ var async = require('async'), // override debug.log to print only as console.log debug.log = console.log.bind(console); -var gLatestETag = null; // this allows us to rerun tests by restarting this process. and also for every appstore push +var gLastModified = null; // do not use etag since it only hashes body. touching file to rerun tests is nice var gLatestBoxVersion = null; // for sending mail function start() { @@ -32,8 +29,8 @@ function runTestsIfNeeded(callback) { getLatestBoxVersion(function (error, latestETag, latestBoxVersion, lastModified) { if (error) return callback(error); - if (latestETag === gLatestETag) { - debug('Box version has not changed. etag %s', gLatestETag); + if (lastModified === gLastModified) { + debug('Box version has not changed. etag:%s lm:%s', latestETag, lastModified); return callback(); } @@ -46,8 +43,8 @@ function runTestsIfNeeded(callback) { } runTests(latestETag, latestBoxVersion, function (error) { - debug('Finished running tests for etag %s: %s', latestETag, error); - gLatestETag = latestETag; + debug('Finished running tests for etag %s / lm %s: %s', latestETag, lastModified, error); + gLastModified = lastModified; gLatestBoxVersion = latestBoxVersion; callback(error); });