Skip to content

build: don't run lint from test-ci #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: orangemocha-reconcile-ci2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ test-all-http1: test-build
test-all-valgrind: test-build
$(PYTHON) tools/test.py --mode=debug,release --valgrind

test-ci:
$(PYTHON) tools/test.py -ptap --logfile test.tap --mode=release --arch=$(DESTCPU) simple message internet

test-release: test-build
$(PYTHON) tools/test.py --mode=release

Expand Down Expand Up @@ -306,11 +309,11 @@ $(PKG): release-only
rm -rf $(PKGDIR)
rm -rf out/deps out/Release
$(PYTHON) ./configure --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=ia32 --tag=$(TAG)
--dest-cpu=ia32 --tag=$(TAG)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)/32
rm -rf out/deps out/Release
$(PYTHON) ./configure --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=x64 --tag=$(TAG)
--dest-cpu=x64 --tag=$(TAG)
$(MAKE) install V=$(V) DESTDIR=$(PKGDIR)
SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh
lipo $(PKGDIR)/32/usr/local/bin/node \
Expand Down Expand Up @@ -343,7 +346,7 @@ $(BINARYTAR): release-only
rm -rf $(BINARYNAME)
rm -rf out/deps out/Release
$(PYTHON) ./configure --prefix=/ --download=all --with-intl=small-icu \
--without-snapshot --dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
--dest-cpu=$(DESTCPU) --tag=$(TAG) $(CONFIG_FLAGS)
$(MAKE) install DESTDIR=$(BINARYNAME) V=$(V) PORTABLE=1
cp README.md $(BINARYNAME)
cp LICENSE $(BINARYNAME)
Expand All @@ -356,7 +359,7 @@ binary: $(BINARYTAR)

$(PKGSRC): release-only
rm -rf dist out
$(PYTHON) configure --prefix=/ --without-snapshot --download=all \
$(PYTHON) configure --prefix=/ --download=all \
--with-intl=small-icu --dest-cpu=$(DESTCPU) --tag=$(TAG) \
$(CONFIG_FLAGS)
$(MAKE) install DESTDIR=dist
Expand Down
1 change: 0 additions & 1 deletion android-configure
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ export CXX=arm-linux-androideabi-g++
export LINK=arm-linux-androideabi-g++

./configure \
--without-snapshot \
--dest-cpu=arm \
--dest-os=android
21 changes: 16 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,16 @@ parser.add_option('--without-perfctr',
dest='without_perfctr',
help='build without performance counters')

parser.add_option('--with-snapshot',
action='store_true',
dest='with_snapshot',
help=optparse.SUPPRESS_HELP)

# Dummy option for backwards compatibility.
parser.add_option('--without-snapshot',
action='store_true',
dest='without_snapshot',
help='build without snapshotting V8 libraries. You might want to set'
' this for cross-compiling. [Default: False]')
dest='unused_without_snapshot',
help=optparse.SUPPRESS_HELP)

parser.add_option('--without-ssl',
action='store_true',
Expand All @@ -323,6 +328,12 @@ parser.add_option('--xcode',
# set up auto-download list
auto_downloads = nodedownload.parse(options.download_list)


def warn(msg):
prefix = '\033[1m\033[91mWARNING\033[0m' if os.isatty(1) else 'WARNING'
print('%s: %s' % (prefix, msg))


def b(value):
"""Returns the string 'true' if value is truthy, 'false' otherwise."""
if value:
Expand Down Expand Up @@ -515,7 +526,7 @@ def configure_node(o):
o['variables']['host_arch'] = host_arch
o['variables']['target_arch'] = target_arch

if target_arch != host_arch and not options.without_snapshot:
if target_arch != host_arch and options.with_snapshot:
o['variables']['want_separate_host_toolset'] = 1
else:
o['variables']['want_separate_host_toolset'] = 0
Expand Down Expand Up @@ -651,7 +662,7 @@ def configure_v8(o):
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds.
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
o['variables']['v8_use_snapshot'] = b(not options.without_snapshot)
o['variables']['v8_use_snapshot'] = b(options.with_snapshot)

# assume shared_v8 if one of these is set?
if options.shared_v8_libpath:
Expand Down
2 changes: 1 addition & 1 deletion node.gyp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'variables': {
'v8_use_snapshot%': 'true',
'v8_use_snapshot%': 'false',
'node_use_dtrace%': 'false',
'node_use_etw%': 'false',
'node_use_perfctr%': 'false',
Expand Down
28 changes: 20 additions & 8 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@


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

logger = logging.getLogger('testrunner')

VERBOSE = False


Expand Down Expand Up @@ -225,7 +228,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):
Expand All @@ -238,26 +241,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
Expand Down Expand Up @@ -1192,6 +1195,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",
Expand Down Expand Up @@ -1368,6 +1373,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]
Expand Down
22 changes: 13 additions & 9 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ set msiplatform=x86
set target=Build
set target_arch=ia32
set debug_arg=
set nosnapshot_arg=
set snapshot_arg=
set noprojgen=
set nobuild=
set nosign=
set nosnapshot=
set snapshot=
set test=
set test_args=
set msi=
Expand Down Expand Up @@ -50,7 +50,7 @@ if /i "%1"=="x64" set target_arch=x64&goto arg-ok
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
if /i "%1"=="nosign" set nosign=1&goto arg-ok
if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok
if /i "%1"=="snapshot" set snapshot=1&goto arg-ok
if /i "%1"=="noetw" set noetw=1&goto arg-ok
if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok
if /i "%1"=="licensertf" set licensertf=1&goto arg-ok
Expand All @@ -61,7 +61,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 jslint=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
Expand All @@ -81,10 +82,9 @@ goto next-arg

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

if defined build_release (
set nosnapshot=1
set snapshot=
set config=Release
set msi=1
set licensertf=1
Expand All @@ -94,7 +94,7 @@ if defined build_release (

if "%config%"=="Debug" set debug_arg=--debug
if "%target_arch%"=="x64" set msiplatform=x64
if defined nosnapshot set nosnapshot_arg=--without-snapshot
if defined snapshot set snapshot_arg=--with-snapshot
if defined noetw set noetw_arg=--without-etw& set noetw_msi_arg=/p:NoETW=1
if defined noperfctr set noperfctr_arg=--without-perfctr& set noperfctr_msi_arg=/p:NoPerfCtr=1

Expand Down Expand Up @@ -151,7 +151,7 @@ goto exit
if defined noprojgen goto msbuild

@rem Generate the VS project.
python configure %download_arg% %i18n_arg% %debug_arg% %nosnapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG%
python configure %download_arg% %i18n_arg% %debug_arg% %snapshot_arg% %noetw_arg% %noperfctr_arg% --dest-cpu=%target_arch% --tag=%TAG%
if errorlevel 1 goto create-msvs-files-failed
if not exist node.sln goto create-msvs-files-failed
echo Project files generated.
Expand Down Expand Up @@ -202,7 +202,11 @@ if "%test%"=="" goto exit
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 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
Expand All @@ -224,7 +228,7 @@ goto exit
:run-tests
echo running 'python tools/test.py %test_args%'
python tools/test.py %test_args%
if "%test%"=="test" goto jslint
if defined jslint goto jslint
goto exit

:create-msvs-files-failed
Expand Down