function buildAllTests(options) {
  var glob = /** @type {{sync:!Function}} */ (require('glob'));
  var testFiles = glob.sync('tests/**/*_test.js');
  if (options.filter) {
    var filters = typeof(options.filter) == 'string' ? [options.filter] :
        options.filter;
    testFiles = testFiles.filter(function(file) {
      return filters.some(function(filter) {
        return file.indexOf(filter) != -1;
      });
    });
  }

  var functionItems = testFiles.map(function(file) {
    return {
      fn: buildTest.bind(null, pathMod.resolve(file)),
      name: file
    };
  });

  var total = functionItems.length;
  var maxRunners = process.env['CONCURRENT_BUILDER'] || 8;
  var onStart = function(functionItem, index) {
    log('Building...', index + 1, 'of', total, functionItem.name);
  };
  return batchRun(functionItems, maxRunners, onStart);
}
Builds tests that pull lovefield.min.js as an external script.
@param {{filter: string}} options
@return {!IThenable}