Skip to content
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

tools,test: teach test.py new tricks #23251

Merged
merged 2 commits into from
Oct 16, 2018
Merged
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: 1 addition & 10 deletions test/message/testcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ def GetSource(self):


class MessageTestConfiguration(test.TestConfiguration):

def __init__(self, context, root):
super(MessageTestConfiguration, self).__init__(context, root)

def Ls(self, path):
if isdir(path):
return [f for f in os.listdir(path)
Expand All @@ -135,11 +131,6 @@ def ListTests(self, current_path, path, arch, mode):
def GetBuildRequirements(self):
return ['sample', 'sample=shell']

def GetTestStatus(self, sections, defs):
status_file = join(self.root, 'message.status')
if exists(status_file):
test.ReadConfigurationInto(status_file, sections, defs)


def GetConfiguration(context, root):
return MessageTestConfiguration(context, root)
return MessageTestConfiguration(context, root, 'message')
11 changes: 1 addition & 10 deletions test/pseudo-tty/testcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ def RunCommand(self, command, env):


class TTYTestConfiguration(test.TestConfiguration):

def __init__(self, context, root):
super(TTYTestConfiguration, self).__init__(context, root)

def Ls(self, path):
if isdir(path):
return [f[:-3] for f in os.listdir(path) if f.endswith('.js')]
Expand Down Expand Up @@ -155,11 +151,6 @@ def ListTests(self, current_path, path, arch, mode):
def GetBuildRequirements(self):
return ['sample', 'sample=shell']

def GetTestStatus(self, sections, defs):
status_file = join(self.root, 'pseudo-tty.status')
if exists(status_file):
test.ReadConfigurationInto(status_file, sections, defs)


def GetConfiguration(context, root):
return TTYTestConfiguration(context, root)
return TTYTestConfiguration(context, root, 'pseudo-tty')
190 changes: 190 additions & 0 deletions test/root.status
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
[$mode==debug]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep the test status in the respective .status files in the test directories (e.g. parallel.status).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How strongly do you feel about that? IMHO having it in one place (1) will enabled easier auditing of this list (2) expresses that it's a cross-cutting concern.

I could instead move all the other rules to this single place, that also has benefits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that strongly 😆.

I could instead move all the other rules to this single place, that also has benefits.

I could get behind this. My worry is that at some point other annotations (e.g. flaky ) start appearing in root.status in addition to e.g. parallel.status (where they currently are set) and I'd rather avoid any potential confusion.

What do @nodejs/testing think?

async-hooks/test-callback-error: SLOW
async-hooks/test-callback-error: SLOW
async-hooks/test-emit-init: SLOW
async-hooks/test-emit-init: SLOW
async-hooks/test-querywrap: SLOW
async-hooks/test-querywrap: SLOW
async-hooks/test-tlswrap: SLOW
async-hooks/test-tlswrap: SLOW
message/eval_messages: SLOW
message/stdin_messages: SLOW
parallel/test-benchmark-assert: SLOW
parallel/test-benchmark-cluster: SLOW
parallel/test-benchmark-crypto: SLOW
parallel/test-benchmark-dns: SLOW
parallel/test-benchmark-domain: SLOW
parallel/test-benchmark-es: SLOW
parallel/test-benchmark-events: SLOW
parallel/test-benchmark-fs: SLOW
parallel/test-benchmark-misc: SLOW
parallel/test-benchmark-module: SLOW
parallel/test-benchmark-os: SLOW
parallel/test-benchmark-process: SLOW
parallel/test-benchmark-querystring: SLOW
parallel/test-benchmark-streams: SLOW
parallel/test-benchmark-string_decoder: SLOW
parallel/test-benchmark-timers: SLOW
parallel/test-benchmark-url: SLOW
parallel/test-benchmark-util: SLOW
parallel/test-benchmark-v8: SLOW
parallel/test-benchmark-vm: SLOW
parallel/test-benchmark-zlib: SLOW
parallel/test-buffer-constructor-node-modules-paths: SLOW
parallel/test-buffer-indexof: SLOW
parallel/test-child-process-spawnsync-input: SLOW
parallel/test-child-process-windows-hide: SLOW
parallel/test-cli-eval: SLOW
parallel/test-cli-eval-event: SLOW
parallel/test-cli-node-options: SLOW
parallel/test-cli-node-options-disallowed: SLOW
parallel/test-cli-node-print-help: SLOW
parallel/test-cli-syntax: SLOW
parallel/test-cluster-basic: SLOW
parallel/test-cluster-bind-privileged-port: SLOW
parallel/test-cluster-bind-twice: SLOW
parallel/test-cluster-disconnect: SLOW
parallel/test-cluster-disconnect-idle-worker: SLOW
parallel/test-crypto-fips: SLOW
parallel/test-domain-abort-on-uncaught: SLOW
parallel/test-domain-uncaught-exception: SLOW
parallel/test-domain-with-abort-on-uncaught-exception: SLOW
parallel/test-env-var-no-warnings: SLOW
parallel/test-error-reporting: SLOW
parallel/test-eslint-alphabetize-errors: SLOW
parallel/test-eslint-buffer-constructor: SLOW
parallel/test-eslint-crypto-check: SLOW
parallel/test-eslint-documented-errors: SLOW
parallel/test-eslint-duplicate-requires: SLOW
parallel/test-eslint-eslint-check: SLOW
parallel/test-eslint-inspector-check: SLOW
parallel/test-eslint-lowercase-name-for-primitive: SLOW
parallel/test-eslint-no-let-in-for-declaration: SLOW
parallel/test-eslint-no-unescaped-regexp-dot: SLOW
parallel/test-eslint-number-isnan: SLOW
parallel/test-eslint-prefer-assert-iferror: SLOW
parallel/test-eslint-prefer-assert-methods: SLOW
parallel/test-eslint-prefer-common-expectserror: SLOW
parallel/test-eslint-prefer-common-mustnotcall: SLOW
parallel/test-eslint-prefer-util-format-errors: SLOW
parallel/test-eslint-require-buffer: SLOW
parallel/test-eslint-required-modules: SLOW
parallel/test-fs-read-stream-concurrent-reads: SLOW
parallel/test-gc-tls-external-memory: SLOW
parallel/test-heapdump-dns: SLOW
parallel/test-heapdump-fs-promise: SLOW
parallel/test-heapdump-http2: SLOW
parallel/test-heapdump-inspector: SLOW
parallel/test-heapdump-tls: SLOW
parallel/test-heapdump-worker: SLOW
parallel/test-heapdump-zlib: SLOW
parallel/test-http-client-timeout-option-with-agent: SLOW
parallel/test-http-pipeline-flood: SLOW
parallel/test-http-pipeline-requests-connection-leak: SLOW
parallel/test-http2-forget-closed-streams: SLOW
parallel/test-http2-multiplex: SLOW
parallel/test-inspector-tracing-domain: SLOW
parallel/test-listen-fd-cluster: SLOW
parallel/test-module-loading-globalpaths: SLOW
parallel/test-module-main-fail: SLOW
parallel/test-module-main-preserve-symlinks-fail: SLOW
parallel/test-net-pingpong: SLOW
parallel/test-next-tick-fixed-queue-regression: SLOW
parallel/test-npm-install: SLOW
parallel/test-preload: SLOW
parallel/test-repl: SLOW
parallel/test-repl-tab-complete: SLOW
parallel/test-repl-top-level-await: SLOW
parallel/test-stdio-pipe-access: SLOW
parallel/test-stream-pipeline: SLOW
parallel/test-stream2-read-sync-stack: SLOW
parallel/test-stringbytes-external: SLOW
parallel/test-sync-io-option: SLOW
parallel/test-tick-processor-arguments: SLOW
parallel/test-tls-env-bad-extra-ca: SLOW
parallel/test-tls-env-extra-ca: SLOW
parallel/test-tls-handshake-exception: SLOW
parallel/test-tls-securepair-leak: SLOW
parallel/test-tls-server-verify: SLOW
parallel/test-tls-session-cache: SLOW
parallel/test-tls-ticket-cluster: SLOW
parallel/test-tls-timeout-server: SLOW
parallel/test-tls-timeout-server-2: SLOW
parallel/test-tls-tlswrap-segfault: SLOW
parallel/test-trace-events-all: SLOW
parallel/test-trace-events-api: SLOW
parallel/test-trace-events-async-hooks: SLOW
parallel/test-trace-events-binding: SLOW
parallel/test-trace-events-bootstrap: SLOW
parallel/test-trace-events-category-used: SLOW
parallel/test-trace-events-file-pattern: SLOW
parallel/test-trace-events-fs-sync: SLOW
parallel/test-trace-events-metadata: SLOW
parallel/test-trace-events-none: SLOW
parallel/test-trace-events-perf: SLOW
parallel/test-trace-events-process-exit: SLOW
parallel/test-trace-events-promises: SLOW
parallel/test-trace-events-v8: SLOW
parallel/test-trace-events-vm: SLOW
parallel/test-trace-events-worker-metadata: SLOW
parallel/test-tracing-no-crash: SLOW
parallel/test-url-relative: SLOW
parallel/test-util-callbackify: SLOW
parallel/test-util-inspect: SLOW
parallel/test-util-inspect-long-running: SLOW
parallel/test-util-types: SLOW
parallel/test-v8-coverage: SLOW
parallel/test-vm-api-handles-getter-errors: SLOW
parallel/test-vm-basic: SLOW
parallel/test-vm-cached-data: SLOW
parallel/test-vm-sigint: SLOW
parallel/test-vm-sigint-existing-handler: SLOW
parallel/test-vm-symbols: SLOW
parallel/test-vm-syntax-error-message: SLOW
parallel/test-vm-syntax-error-stderr: SLOW
parallel/test-worker: SLOW
parallel/test-worker-cleanup-handles: SLOW
parallel/test-worker-debug: SLOW
parallel/test-worker-esmodule: SLOW
parallel/test-worker-exit-code: SLOW
parallel/test-worker-memory: SLOW
parallel/test-worker-message-channel: SLOW
parallel/test-worker-message-channel-sharedarraybuffer: SLOW
parallel/test-worker-nexttick-terminate: SLOW
parallel/test-worker-onmessage: SLOW
parallel/test-worker-onmessage-not-a-function: SLOW
parallel/test-worker-parent-port-ref: SLOW
parallel/test-worker-relative-path: SLOW
parallel/test-worker-relative-path-double-dot: SLOW
parallel/test-worker-stdio: SLOW
parallel/test-worker-syntax-error: SLOW
parallel/test-worker-syntax-error-file: SLOW
parallel/test-worker-uncaught-exception: SLOW
parallel/test-worker-uncaught-exception-async: SLOW
parallel/test-worker-unsupported-things: SLOW
parallel/test-worker-workerdata-sharedarraybuffer: SLOW
parallel/test-zlib-bytes-read: SLOW
parallel/test-zlib-convenience-methods: SLOW
sequential/test-benchmark-buffer: SLOW
sequential/test-benchmark-child-process: SLOW
sequential/test-benchmark-dgram: SLOW
sequential/test-benchmark-http: SLOW
sequential/test-benchmark-net: SLOW
sequential/test-benchmark-path: SLOW
sequential/test-benchmark-tls: SLOW
sequential/test-child-process-execsync: SLOW
sequential/test-child-process-exit: SLOW
sequential/test-child-process-pass-fd: SLOW
sequential/test-fs-readfile-tostring-fail: SLOW
sequential/test-fs-watch-system-limit: SLOW
sequential/test-gc-http-client: SLOW
sequential/test-gc-http-client-connaborted: SLOW
sequential/test-gc-http-client-onerror: SLOW
sequential/test-gc-http-client-timeout: SLOW
sequential/test-gc-net-timeout: SLOW
sequential/test-http2-ping-flood: SLOW
sequential/test-http2-settings-flood: SLOW
sequential/test-inspector-port-cluster: SLOW
sequential/test-net-bytes-per-incoming-chunk-overhead: SLOW
sequential/test-pipe: SLOW
sequential/test-util-debug: SLOW
10 changes: 2 additions & 8 deletions test/testpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,10 @@ def GetCommand(self):
def GetSource(self):
return open(self.file).read()

class SimpleTestConfiguration(test.TestConfiguration):

class SimpleTestConfiguration(test.TestConfiguration):
def __init__(self, context, root, section, additional=None):
super(SimpleTestConfiguration, self).__init__(context, root)
self.section = section
super(SimpleTestConfiguration, self).__init__(context, root, section)
if additional is not None:
self.additional_flags = additional
else:
Expand All @@ -122,11 +121,6 @@ def ListTests(self, current_path, path, arch, mode):
def GetBuildRequirements(self):
return ['sample', 'sample=shell']

def GetTestStatus(self, sections, defs):
status_file = join(self.root, '%s.status' % (self.section))
if exists(status_file):
test.ReadConfigurationInto(status_file, sections, defs)

class ParallelTestConfiguration(SimpleTestConfiguration):
def __init__(self, context, root, section, additional=None):
super(ParallelTestConfiguration, self).__init__(context, root, section,
Expand Down
Loading