@@ -1,5 +1,5 @@
{
"version": "2.11.2",
"version": "2.11.3",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -57,7 +57,7 @@
"hosted-git-info": "~2.1.4",
"inflight": "~1.0.4",
"inherits": "~2.0.1",
"ini": "~1.3.3",
"ini": "~1.3.4",
"init-package-json": "~1.6.0",
"lockfile": "~1.0.1",
"lru-cache": "~2.6.4",
@@ -66,7 +66,7 @@
"node-gyp": "~2.0.1",
"nopt": "~3.0.2",
"normalize-git-url": "~1.0.1",
"normalize-package-data": "~2.2.0",
"normalize-package-data": "~2.2.1",
"npm-cache-filename": "~1.0.1",
"npm-install-checks": "~1.0.5",
"npm-package-arg": "~4.0.1",
@@ -75,7 +75,7 @@
"npmlog": "~1.2.1",
"once": "~1.3.2",
"opener": "~1.4.1",
"osenv": "~0.1.1",
"osenv": "~0.1.2",
"path-is-inside": "~1.0.0",
"read": "~1.0.6",
"read-installed": "~4.0.0",
@@ -84,12 +84,12 @@
"realize-package-specifier": "~3.0.1",
"request": "~2.57.0",
"retry": "~0.6.1",
"rimraf": "~2.3.4",
"rimraf": "~2.4.0",
"semver": "~4.3.6",
"sha": "~1.3.0",
"slide": "~1.1.6",
"sorted-object": "~1.0.0",
"spdx": "~0.4.0",
"spdx": "~0.4.1",
"strip-ansi": "~2.0.1",
"tar": "~2.1.1",
"text-table": "~0.2.0",
@@ -175,7 +175,7 @@
"deep-equal": "~1.0.0",
"marked": "~0.3.3",
"marked-man": "~0.1.4",
"nock": "~2.3.0",
"nock": "~2.5.0",
"npm-registry-couchapp": "~2.6.7",
"npm-registry-mock": "~1.0.0",
"require-inject": "~1.2.0",
@@ -1,4 +1,4 @@
globalconfig=/Users/rebecca/code/release/npm/test/fixtures/config/globalconfig
globalconfig=/Users/ogd/Documents/projects/npm/npm/test/fixtures/config/globalconfig
email=i@izs.me
env-thing=asdf
init.author.name=Isaac Z. Schlueter
@@ -22,7 +22,8 @@ test('npm version <semver> with failing preversion lifecycle script', function (
preversion: './fail.sh'
}
}), 'utf8')
fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', {mode: 448})
fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8')
fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448)
npm.load({cache: cache, registry: common.registry}, function () {
var version = require('../../lib/version')
version(['patch'], function (err) {
@@ -44,7 +45,8 @@ test('npm version <semver> with failing postversion lifecycle script', function
postversion: './fail.sh'
}
}), 'utf8')
fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', {mode: 448})
fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8')
fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448)
npm.load({cache: cache, registry: common.registry}, function () {
var version = require('../../lib/version')
version(['patch'], function (err) {
@@ -21,24 +21,20 @@
// V8_HOST_ARCH_IA32 on both 32- and 64-bit x86.
#define V8_HOST_ARCH_IA32 1
#define V8_HOST_ARCH_32_BIT 1
#define V8_HOST_CAN_READ_UNALIGNED 1
#else
#define V8_HOST_ARCH_X64 1
#if defined(__x86_64__) && !defined(__LP64__)
#define V8_HOST_ARCH_32_BIT 1
#else
#define V8_HOST_ARCH_64_BIT 1
#endif
#define V8_HOST_CAN_READ_UNALIGNED 1
#endif // __native_client__
#elif defined(_M_IX86) || defined(__i386__)
#define V8_HOST_ARCH_IA32 1
#define V8_HOST_ARCH_32_BIT 1
#define V8_HOST_CAN_READ_UNALIGNED 1
#elif defined(__AARCH64EL__)
#define V8_HOST_ARCH_ARM64 1
#define V8_HOST_ARCH_64_BIT 1
#define V8_HOST_CAN_READ_UNALIGNED 1
#elif defined(__ARMEL__)
#define V8_HOST_ARCH_ARM 1
#define V8_HOST_ARCH_32_BIT 1
@@ -17,19 +17,17 @@ namespace internal {


static inline double read_double_value(Address p) {
#ifdef V8_HOST_CAN_READ_UNALIGNED
return Memory::double_at(p);
#else // V8_HOST_CAN_READ_UNALIGNED
// Prevent gcc from using load-double (mips ldc1) on (possibly)
// non-64-bit aligned address.
// We assume that the address is 32-bit aligned.
DCHECK(IsAligned(reinterpret_cast<intptr_t>(p), kInt32Size));
union conversion {
double d;
uint32_t u[2];
} c;
c.u[0] = *reinterpret_cast<uint32_t*>(p);
c.u[1] = *reinterpret_cast<uint32_t*>(p + 4);
c.u[0] = Memory::uint32_at(p);
c.u[1] = Memory::uint32_at(p + 4);
return c.d;
#endif // V8_HOST_CAN_READ_UNALIGNED
}


@@ -1648,7 +1648,7 @@ void Logger::LogCodeObject(Object* object) {
tag = Logger::REG_EXP_TAG;
break;
case Code::BUILTIN:
description = "A builtin from the snapshot";
description = isolate_->builtins()->name(code_object->builtin_index());
tag = Logger::BUILTIN_TAG;
break;
case Code::HANDLER:
@@ -9026,36 +9026,7 @@ template <typename Char>
static inline bool CompareRawStringContents(const Char* const a,
const Char* const b,
int length) {
int i = 0;
#ifndef V8_HOST_CAN_READ_UNALIGNED
// If this architecture isn't comfortable reading unaligned ints
// then we have to check that the strings are aligned before
// comparing them blockwise.
const int kAlignmentMask = sizeof(uint32_t) - 1; // NOLINT
uintptr_t pa_addr = reinterpret_cast<uintptr_t>(a);
uintptr_t pb_addr = reinterpret_cast<uintptr_t>(b);
if (((pa_addr & kAlignmentMask) | (pb_addr & kAlignmentMask)) == 0) {
#endif
const int kStepSize = sizeof(int) / sizeof(Char); // NOLINT
int endpoint = length - kStepSize;
// Compare blocks until we reach near the end of the string.
for (; i <= endpoint; i += kStepSize) {
uint32_t wa = *reinterpret_cast<const uint32_t*>(a + i);
uint32_t wb = *reinterpret_cast<const uint32_t*>(b + i);
if (wa != wb) {
return false;
}
}
#ifndef V8_HOST_CAN_READ_UNALIGNED
}
#endif
// Compare the remaining characters that didn't fit into a block.
for (; i < length; i++) {
if (a[i] != b[i]) {
return false;
}
}
return true;
return CompareChars(a, b, length) == 0;
}


@@ -9313,22 +9313,33 @@ class String: public Name {
static inline int NonAsciiStart(const char* chars, int length) {
const char* start = chars;
const char* limit = chars + length;
#ifdef V8_HOST_CAN_READ_UNALIGNED
DCHECK(unibrow::Utf8::kMaxOneByteChar == 0x7F);
const uintptr_t non_ascii_mask = kUintptrAllBitsSet / 0xFF * 0x80;
while (chars + sizeof(uintptr_t) <= limit) {
if (*reinterpret_cast<const uintptr_t*>(chars) & non_ascii_mask) {
return static_cast<int>(chars - start);

if (length >= kIntptrSize) {
// Check unaligned bytes.
while (!IsAligned(reinterpret_cast<intptr_t>(chars), sizeof(uintptr_t))) {
if (static_cast<uint8_t>(*chars) > unibrow::Utf8::kMaxOneByteChar) {
return static_cast<int>(chars - start);
}
++chars;
}
// Check aligned words.
DCHECK(unibrow::Utf8::kMaxOneByteChar == 0x7F);
const uintptr_t non_ascii_mask = kUintptrAllBitsSet / 0xFF * 0x80;
while (chars + sizeof(uintptr_t) <= limit) {
if (*reinterpret_cast<const uintptr_t*>(chars) & non_ascii_mask) {
return static_cast<int>(chars - start);
}
chars += sizeof(uintptr_t);
}
chars += sizeof(uintptr_t);
}
#endif
// Check remaining unaligned bytes.
while (chars < limit) {
if (static_cast<uint8_t>(*chars) > unibrow::Utf8::kMaxOneByteChar) {
return static_cast<int>(chars - start);
}
++chars;
}

return static_cast<int>(chars - start);
}

@@ -31,6 +31,7 @@ class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
virtual ~RegExpMacroAssemblerIrregexp();
// The byte-code interpreter checks on each push anyway.
virtual int stack_limit_slack() { return 1; }
virtual bool CanReadUnaligned() { return false; }
virtual void Bind(Label* label);
virtual void AdvanceCurrentPosition(int by); // Signed cp change.
virtual void PopCurrentPosition();
@@ -24,15 +24,6 @@ RegExpMacroAssembler::~RegExpMacroAssembler() {
}


bool RegExpMacroAssembler::CanReadUnaligned() {
#ifdef V8_HOST_CAN_READ_UNALIGNED
return true;
#else
return false;
#endif
}


#ifndef V8_INTERPRETED_REGEXP // Avoid unused code, e.g., on ARM.

NativeRegExpMacroAssembler::NativeRegExpMacroAssembler(Zone* zone)
@@ -48,7 +48,7 @@ class RegExpMacroAssembler {
// kCheckStackLimit flag to push operations (instead of kNoStackLimitCheck)
// at least once for every stack_limit() pushes that are executed.
virtual int stack_limit_slack() = 0;
virtual bool CanReadUnaligned();
virtual bool CanReadUnaligned() = 0;
virtual void AdvanceCurrentPosition(int by) = 0; // Signed cp change.
virtual void AdvanceRegister(int reg, int by) = 0; // r[reg] += by.
// Continues execution from the position pushed on the top of the backtrack
@@ -6491,34 +6491,38 @@ static bool FastAsciiConvert(char* dst,
bool changed = false;
uintptr_t or_acc = 0;
const char* const limit = src + length;
#ifdef V8_HOST_CAN_READ_UNALIGNED
// Process the prefix of the input that requires no conversion one
// (machine) word at a time.
while (src <= limit - sizeof(uintptr_t)) {
const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
or_acc |= w;
if (AsciiRangeMask(w, lo, hi) != 0) {
changed = true;
break;

// dst is newly allocated and always aligned.
DCHECK(IsAligned(reinterpret_cast<intptr_t>(dst), sizeof(uintptr_t)));
// Only attempt processing one word at a time if src is also aligned.
if (IsAligned(reinterpret_cast<intptr_t>(src), sizeof(uintptr_t))) {
// Process the prefix of the input that requires no conversion one aligned
// (machine) word at a time.
while (src <= limit - sizeof(uintptr_t)) {
const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
or_acc |= w;
if (AsciiRangeMask(w, lo, hi) != 0) {
changed = true;
break;
}
*reinterpret_cast<uintptr_t*>(dst) = w;
src += sizeof(uintptr_t);
dst += sizeof(uintptr_t);
}
// Process the remainder of the input performing conversion when
// required one word at a time.
while (src <= limit - sizeof(uintptr_t)) {
const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
or_acc |= w;
uintptr_t m = AsciiRangeMask(w, lo, hi);
// The mask has high (7th) bit set in every byte that needs
// conversion and we know that the distance between cases is
// 1 << 5.
*reinterpret_cast<uintptr_t*>(dst) = w ^ (m >> 2);
src += sizeof(uintptr_t);
dst += sizeof(uintptr_t);
}
*reinterpret_cast<uintptr_t*>(dst) = w;
src += sizeof(uintptr_t);
dst += sizeof(uintptr_t);
}
// Process the remainder of the input performing conversion when
// required one word at a time.
while (src <= limit - sizeof(uintptr_t)) {
const uintptr_t w = *reinterpret_cast<const uintptr_t*>(src);
or_acc |= w;
uintptr_t m = AsciiRangeMask(w, lo, hi);
// The mask has high (7th) bit set in every byte that needs
// conversion and we know that the distance between cases is
// 1 << 5.
*reinterpret_cast<uintptr_t*>(dst) = w ^ (m >> 2);
src += sizeof(uintptr_t);
dst += sizeof(uintptr_t);
}
#endif
// Process the last few bytes of the input (or the whole input if
// unaligned access is not supported).
while (src < limit) {
@@ -6532,9 +6536,8 @@ static bool FastAsciiConvert(char* dst,
++src;
++dst;
}
if ((or_acc & kAsciiMask) != 0) {
return false;
}

if ((or_acc & kAsciiMask) != 0) return false;

DCHECK(CheckFastAsciiConvert(
saved_dst, saved_src, length, changed, Converter::kIsToLower));
@@ -24,14 +24,10 @@ SnapshotByteSource::~SnapshotByteSource() { }

int32_t SnapshotByteSource::GetUnalignedInt() {
DCHECK(position_ < length_); // Require at least one byte left.
#if defined(V8_HOST_CAN_READ_UNALIGNED) && __BYTE_ORDER == __LITTLE_ENDIAN
int32_t answer = *reinterpret_cast<const int32_t*>(data_ + position_);
#else
int32_t answer = data_[position_];
answer |= data_[position_ + 1] << 8;
answer |= data_[position_ + 2] << 16;
answer |= data_[position_ + 3] << 24;
#endif
return answer;
}

@@ -155,6 +155,7 @@ unsigned Utf8::Length(uchar c, int previous) {

Utf8DecoderBase::Utf8DecoderBase()
: unbuffered_start_(NULL),
unbuffered_length_(0),
utf16_length_(0),
last_byte_of_buffer_unused_(false) {}

@@ -194,8 +195,7 @@ unsigned Utf8Decoder<kBufferSize>::WriteUtf16(uint16_t* data,
if (length <= buffer_length) return length;
DCHECK(unbuffered_start_ != NULL);
// Copy the rest the slow way.
WriteUtf16Slow(unbuffered_start_,
data + buffer_length,
WriteUtf16Slow(unbuffered_start_, unbuffered_length_, data + buffer_length,
length - buffer_length);
return length;
}
@@ -265,6 +265,7 @@ void Utf8DecoderBase::Reset(uint16_t* buffer,
// Assume everything will fit in the buffer and stream won't be needed.
last_byte_of_buffer_unused_ = false;
unbuffered_start_ = NULL;
unbuffered_length_ = 0;
bool writing_to_buffer = true;
// Loop until stream is read, writing to buffer as long as buffer has space.
unsigned utf16_length = 0;
@@ -291,6 +292,7 @@ void Utf8DecoderBase::Reset(uint16_t* buffer,
// Just wrote last character of buffer
writing_to_buffer = false;
unbuffered_start_ = stream;
unbuffered_length_ = stream_length;
}
continue;
}
@@ -300,20 +302,24 @@ void Utf8DecoderBase::Reset(uint16_t* buffer,
writing_to_buffer = false;
last_byte_of_buffer_unused_ = true;
unbuffered_start_ = stream - cursor;
unbuffered_length_ = stream_length + cursor;
}
utf16_length_ = utf16_length;
}


void Utf8DecoderBase::WriteUtf16Slow(const uint8_t* stream,
unsigned stream_length,
uint16_t* data,
unsigned data_length) {
while (data_length != 0) {
unsigned cursor = 0;
uint32_t character = Utf8::ValueOf(stream, Utf8::kMaxEncodedSize, &cursor);

uint32_t character = Utf8::ValueOf(stream, stream_length, &cursor);
// There's a total lack of bounds checking for stream
// as it was already done in Reset.
stream += cursor;
stream_length -= cursor;
if (character > unibrow::Utf16::kMaxNonSurrogateCharCode) {
*data++ = Utf16::LeadSurrogate(character);
*data++ = Utf16::TrailSurrogate(character);
@@ -324,6 +330,7 @@ void Utf8DecoderBase::WriteUtf16Slow(const uint8_t* stream,
data_length -= 1;
}
}
DCHECK(stream_length >= 0);
}


@@ -172,10 +172,10 @@ class Utf8DecoderBase {
unsigned buffer_length,
const uint8_t* stream,
unsigned stream_length);
static void WriteUtf16Slow(const uint8_t* stream,
uint16_t* data,
unsigned length);
static void WriteUtf16Slow(const uint8_t* stream, unsigned stream_length,
uint16_t* data, unsigned length);
const uint8_t* unbuffered_start_;
unsigned unbuffered_length_;
unsigned utf16_length_;
bool last_byte_of_buffer_unused_;
private:
@@ -673,20 +673,11 @@ inline int CompareCharsUnsigned(const lchar* lhs,
const rchar* rhs,
int chars) {
const lchar* limit = lhs + chars;
#ifdef V8_HOST_CAN_READ_UNALIGNED
if (sizeof(*lhs) == sizeof(*rhs)) {
// Number of characters in a uintptr_t.
static const int kStepSize = sizeof(uintptr_t) / sizeof(*lhs); // NOLINT
while (lhs <= limit - kStepSize) {
if (*reinterpret_cast<const uintptr_t*>(lhs) !=
*reinterpret_cast<const uintptr_t*>(rhs)) {
break;
}
lhs += kStepSize;
rhs += kStepSize;
}
if (sizeof(*lhs) == sizeof(char) && sizeof(*rhs) == sizeof(char)) {
// memcmp compares byte-by-byte, yielding wrong results for two-byte
// strings on little-endian systems.
return memcmp(lhs, rhs, chars);
}
#endif
while (lhs < limit) {
int r = static_cast<int>(*lhs) - static_cast<int>(*rhs);
if (r != 0) return r;
@@ -1350,25 +1341,11 @@ void CopyChars(sinkchar* dest, const sourcechar* src, int chars) {
template <typename sourcechar, typename sinkchar>
void CopyCharsUnsigned(sinkchar* dest, const sourcechar* src, int chars) {
sinkchar* limit = dest + chars;
#ifdef V8_HOST_CAN_READ_UNALIGNED
if (sizeof(*dest) == sizeof(*src)) {
if (chars >= static_cast<int>(kMinComplexMemCopy / sizeof(*dest))) {
MemCopy(dest, src, chars * sizeof(*dest));
return;
}
// Number of characters in a uintptr_t.
static const int kStepSize = sizeof(uintptr_t) / sizeof(*dest); // NOLINT
DCHECK(dest + kStepSize > dest); // Check for overflow.
while (dest + kStepSize <= limit) {
*reinterpret_cast<uintptr_t*>(dest) =
*reinterpret_cast<const uintptr_t*>(src);
dest += kStepSize;
src += kStepSize;
}
}
#endif
while (dest < limit) {
*dest++ = static_cast<sinkchar>(*src++);
if ((sizeof(*dest) == sizeof(*src)) &&
(chars >= static_cast<int>(kMinComplexMemCopy / sizeof(*dest)))) {
MemCopy(dest, src, chars * sizeof(*dest));
} else {
while (dest < limit) *dest++ = static_cast<sinkchar>(*src++);
}
}

@@ -0,0 +1,7 @@
// Copyright 2012 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flags: --allow-natives-syntax

assertEquals(-1, %StringCompare("abc\u0102", "abc\u0201"));
@@ -24,7 +24,7 @@

#define NODE_MAJOR_VERSION 0
#define NODE_MINOR_VERSION 12
#define NODE_PATCH_VERSION 6
#define NODE_PATCH_VERSION 7

#define NODE_VERSION_IS_RELEASE 0

@@ -3,6 +3,8 @@ prefix simple
test-crypto-domains : PASS,FLAKY
test-debug-signal-cluster : PASS,FLAKY
test-cluster-basic : PASS,FLAKY
test-microtask-queue-run : PASS,FLAKY
test-microtask-queue-run-domain : PASS,FLAKY

[$system==win32]
test-timers-first-fire : PASS,FLAKY
@@ -46,6 +46,7 @@
<ComponentRef Id="NodeExecutable"/>
<ComponentRef Id="NodeVarsScript"/>
<ComponentRef Id="NodeStartMenuAndRegistryEntries"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="Product.Generated"/>

<Feature Id="NodePerfCtrSupport"
@@ -70,6 +71,7 @@
<ComponentRef Id="NpmCmdScript"/>
<ComponentRef Id="NpmBashScript"/>
<ComponentRef Id="NpmConfigurationFile"/>
<ComponentRef Id="AppData" />
<ComponentGroupRef Id="NpmSourceFiles"/>
</Feature>

@@ -184,6 +186,16 @@
</Component>
</Directory>
</Directory>

<Directory Id="AppDataFolder">
<Directory Id="AppDataDir" Name="npm">
<Component Id="AppData" Guid="D3B35D0E-D0F9-4D11-A773-D4608E90E1D1">
<CreateFolder />
<RemoveFolder Id="AppDataDir" On="uninstall" />
<RegistryValue Root="HKCU" Key="$(var.RegistryKeyPath)\Components" Type="string" Value="" />
</Component>
</Directory>
</Directory>
</DirectoryRef>

<DirectoryRef Id="ApplicationProgramsFolder">
@@ -29,6 +29,7 @@


import imp
import logging
import optparse
import os
import platform
@@ -45,6 +46,8 @@
from datetime import datetime
from Queue import Queue, Empty

logger = logging.getLogger('testrunner')

VERBOSE = False


@@ -65,7 +68,9 @@ def __init__(self, cases, flaky_tests_mode):
self.remaining = len(cases)
self.total = len(cases)
self.failed = [ ]
self.flaky_failed = [ ]
self.crashed = 0
self.flaky_crashed = 0
self.terminate = False
self.lock = threading.Lock()

@@ -126,9 +131,14 @@ def RunSingle(self):
return
self.lock.acquire()
if output.UnexpectedOutput():
self.failed.append(output)
if output.HasCrashed():
self.crashed += 1
if FLAKY in output.test.outcomes and self.flaky_tests_mode == "dontcare":
self.flaky_failed.append(output)
if output.HasCrashed():
self.flaky_crashed += 1
else:
self.failed.append(output)
if output.HasCrashed():
self.crashed += 1
else:
self.succeeded += 1
self.remaining -= 1
@@ -225,7 +235,7 @@ def HasRun(self, output):
class TapProgressIndicator(SimpleProgressIndicator):

def Starting(self):
print '1..%i' % len(self.cases)
logger.info('1..%i' % len(self.cases))
self._done = 0

def AboutToRun(self, case):
@@ -238,26 +248,26 @@ def HasRun(self, output):
status_line = 'not ok %i - %s' % (self._done, command)
if FLAKY in output.test.outcomes and self.flaky_tests_mode == "dontcare":
status_line = status_line + " # TODO : Fix flaky test"
print status_line
logger.info(status_line)
for l in output.output.stderr.splitlines():
print '#' + l
logger.info('#' + l)
for l in output.output.stdout.splitlines():
print '#' + l
logger.info('#' + l)
else:
status_line = 'ok %i - %s' % (self._done, command)
if FLAKY in output.test.outcomes:
status_line = status_line + " # TODO : Fix flaky test"
print status_line
logger.info(status_line)

duration = output.test.duration

# total_seconds() was added in 2.7
total_seconds = (duration.microseconds +
(duration.seconds + duration.days * 24 * 3600) * 10**6) / 10**6

print ' ---'
print ' duration_ms: %d.%d' % (total_seconds, duration.microseconds / 1000)
print ' ...'
logger.info(' ---')
logger.info(' duration_ms: %d.%d' % (total_seconds, duration.microseconds / 1000))
logger.info(' ...')

def Done(self):
pass
@@ -1192,6 +1202,8 @@ def BuildOptions():
default='release')
result.add_option("-v", "--verbose", help="Verbose output",
default=False, action="store_true")
result.add_option('--logfile', dest='logfile',
help='write test output to file. NOTE: this only applies the tap progress indicator')
result.add_option("-S", dest="scons_flags", help="Flag to pass through to scons",
default=[], action="append")
result.add_option("-p", "--progress",
@@ -1368,6 +1380,13 @@ def Main():
parser.print_help()
return 1

ch = logging.StreamHandler(sys.stdout)
logger.addHandler(ch)
logger.setLevel(logging.INFO)
if options.logfile:
fh = logging.FileHandler(options.logfile)
logger.addHandler(fh)

workspace = abspath(join(dirname(sys.argv[0]), '..'))
suites = GetSuites(join(workspace, 'test'))
repositories = [TestRepository(join(workspace, 'test', name)) for name in suites]
@@ -38,6 +38,7 @@ set noperfctr_msi_arg=
set i18n_arg=
set download_arg=
set build_release=
set flaky_tests_arg=

:next-arg
if "%1"=="" goto args-done
@@ -61,7 +62,8 @@ if /i "%1"=="test-simple" set test=test-simple&goto arg-ok
if /i "%1"=="test-message" set test=test-message&goto arg-ok
if /i "%1"=="test-gc" set test=test-gc&set buildnodeweak=1&goto arg-ok
if /i "%1"=="test-all" set test=test-all&set buildnodeweak=1&goto arg-ok
if /i "%1"=="test" set test=test&goto arg-ok
if /i "%1"=="test-ci" set test=test-ci&set nosnapshot=1&goto arg-ok
if /i "%1"=="test" set test=test&set jslint=1&goto arg-ok
@rem Include small-icu support with MSI installer
if /i "%1"=="msi" set msi=1&set licensertf=1&set download_arg="--download=all"&set i18n_arg=small-icu&goto arg-ok
if /i "%1"=="upload" set upload=1&goto arg-ok
@@ -71,6 +73,7 @@ if /i "%1"=="full-icu" set i18n_arg=%1&goto arg-ok
if /i "%1"=="intl-none" set i18n_arg=%1&goto arg-ok
if /i "%1"=="download-all" set download_arg="--download=all"&goto arg-ok
if /i "%1"=="build-release" set build_release=1&goto arg-ok
if /i "%1"=="ignore-flaky" set flaky_tests_arg=--flaky-tests=dontcare&goto arg-ok

echo Warning: ignoring invalid command line option `%1`.

@@ -81,7 +84,6 @@ goto next-arg

:args-done
if defined upload goto upload
if defined jslint goto jslint

if defined build_release (
set nosnapshot=1
@@ -197,12 +199,15 @@ if errorlevel 1 echo Failed to sign msi&goto exit

:run
@rem Run tests if requested.
if "%test%"=="" goto exit
if "%test%"=="" goto jslint

if "%config%"=="Debug" set test_args=--mode=debug
if "%config%"=="Release" set test_args=--mode=release

set test_args=%test_args% --arch=%target_arch%

if "%test%"=="test" set test_args=%test_args% simple message
if "%test%"=="test-ci" set test_args=%test_args% -p tap --logfile test.tap %flaky_tests_arg% simple message internet
if "%test%"=="test-internet" set test_args=%test_args% internet
if "%test%"=="test-pummel" set test_args=%test_args% pummel
if "%test%"=="test-simple" set test_args=%test_args% simple
@@ -224,8 +229,7 @@ goto exit
:run-tests
echo running 'python tools/test.py %test_args%'
python tools/test.py %test_args%
if "%test%"=="test" goto jslint
goto exit
goto jslint

:create-msvs-files-failed
echo Failed to create vc project files.
@@ -243,6 +247,7 @@ scp Release\node.pdb node@nodejs.org:~/web/nodejs.org/dist/v%NODE_VERSION%/node.
goto exit

:jslint
if not defined jslint goto exit
echo running jslint
set PYTHONPATH=tools/closure_linter/
python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ --exclude_files lib/punycode.js