-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
test: fix test-child-process-flush-stdio on windows (Node V4 only) #10523
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
115 commits
Select commit
Hold shift + click to select a range
4d3e158
test,lib,benchmark: match function names
Trott 2677b9b
deps: V8: fix debug backtrace for symbols
ofrobots 47d18d4
deps: backport d800a65 from V8 upstream
MylesBorins 83144af
deps: backport 7a88ff3 from V8 upstream
MylesBorins e0db108
deps: backport a715957 from V8 upstream
MylesBorins 20bee0f
deps: update patch level in V8
MylesBorins 504b01b
v8,src: expose statistics about heap spaces
bripkens 1c81530
child_process: add shell option to spawn()
cjihrig 12ede48
fs: add the fs.mkdtemp() function.
ralt 2912da4
process: add `process.memoryUsage.external`
indutny 6b66647
test: refactor test-net-keepalive.js
kmccmk9 821498e
test: check for error on invalid signal
mattcphillips 25fea45
tools: add macosx-firwall script to avoid popups
danbev 3bd7ab1
test: stream readableListening internal state
b302358
test: refactor test-handle-wrap-close-abort
Trott 151cca6
process: add process.cpuUsage() - implementation, doc, tests
1a40f2d
tls, crypto: add ALPN Support
d706c0d
tls,crypto: move NPN protcol data to hidden value
43ee08f
test: fix alpn tests for openssl1.0.2h
15462eb
tls: copy the Buffer object before using
thefourtheye 4341166
crypto: remove unnecessary variables of alpn/npn
shigeki 2390fa9
test: refactor http pipelined socket test
Trott 126d243
test: refactor assert.equal, update syntax to ES6
8109d61
test: refactor test-http-after-connect.js
larissayvette b4879f8
test: refactor test-fs-fsync
radelmann dccd5fd
test: refactor test-crypto-random
Trott 494d236
test: use const/let and common.mustCall
outsideris 2104124
test: cleanup test-stdout-close-catch.js
furnox 6f8c901
test: refactor test-tls-ecdh-disable
a9ee489
win,msi: add required UIRef for localized strings
billti d5babe6
test: refactor test-timers-this
Trott 5e9c6b5
doc: add Michaël Zasso to the CTC
targos 3b7694f
test: add test-require-invalid-package
d559ba3
test: refactor test-net-reconnect-error
46d673a
test: use strictEqual in test-cwd-enoent-repl.js
nitsnwits c092aa3
test: refactor the code in test-http-keep-alive
edsadr 2968876
test: change assert.strict to assert.strictEqual()
ashita92 ce95ba6
test: refactor test-stream2-writable
Trott 5afa352
test: refactor test-stdin-script-child
emanuelbuholzer a123e8c
test: refactoring test-cluster-worker-constructor
crokita cd08da8
test: change var declarations, add mustCall check
e205bbd
doc: clarify macosx-firewall suggestion BUILDING
chasestarr 6993d1c
doc: consistent 'Returns:' part two
MylesBorins 0e0dc86
test: refactor test-child-process-stdin
navulirs f0714d2
test: improve test-cluster-net-listen.js
f45086b
test: update test-tls-check-server-identity.js
koxauvin 3a9b5b4
test: refactor test-cluster-send-handle-twice.js
amarzavery 9b13d98
test: refactor test-tls-interleave
bchirgwin f69b01e
test: refactor test-pipe-file-to-http
f80084c
test: fix and improve debug-break-on-uncaught
thefourtheye c074982
test: refactor test-child-process-ipc
malenesok007 6d51108
test: improve code in test-vm-symbols
edsadr 81649fd
test: improve code in test-fs-readfile-error
edsadr 7059543
test: improve the code in test-pipe.js
edsadr a394d00
doc: var -> const / let in the console.md
vsemozhetbyt f59b6dd
doc: more efficient example in the console.md
vsemozhetbyt 03d3990
test: refactor the code in test-fs-chmod
edsadr b5b1ca6
doc: add Working Group dissolution text
williamkapke e197129
test: refactor test-stdin-from-file
radelmann e83c121
test: fix flaky test-http-client-timeout-with-data
Trott cbbe46a
test: s/ASSERT/assert/
cjihrig a8ff6b9
doc: redirect 'Start a Working Group' to TSC repo
williamkapke d32d64b
crypto: Use reference count to manage cert_store
AdamMajer 5c8881d
debugger: call `this.resume()` after `this.run()`
lance 8f4c29b
test: stream readableState readingMore state
chmln 2f7270a
test: fail for missing output files
addaleax 2410008
test: refactor test-domain.js
sidthekidder ffbd630
test: update test-domain-uncaught-exception.js
amazingandyyy b6c88d6
test: clean up domain-no-error-handler test
weyj4 906092b
src: fix string format mistake for 32 bit node
posix4e f26213a
stream, test: test _readableState.emittedReadable
joyeecheung 083ff5c
test: stream readable needReadable state
joyeecheung cf1587a
test: stream readable resumeScheduled state
6dfddc8
doc: clarify the review and landing process
joyeecheung 2fb30f8
doc: require() tries first core not native modules
vice 312745a
test: improve test-cluster-worker-constructor.js
edsadr b3bc996
test: fix flaky test-https-timeout
Trott 2a26a31
test: improve code in test-vm-preserves-property
edsadr 0ea78d4
doc: use "Node.js" in V8 guide
Trott 78d85c6
src: describe what NODE_MODULE_VERSION is for
sam-github 418d5ce
build: add (not) cross-compiled configure flags
piranna ff5c111
os: fix os.release() for aix and add test
jBarz 4b55e9c
test: add test for SIGWINCH handling by stdio.js
sarahmeyer 4502851
test: refactor test-stream2-unpipe-drain
storytimesolutions 41a67c9
build: add /opt/freeware/... to AIX library path
2eba1d5
test: use strictEqual in test-http-server
ftatieze c51c3b0
doc: require two-factor authentication
Trott cd0ad3f
test: improve test-fs-empty-readStream.js
edsadr 678c563
doc: warn about unvalidated input in child_process
04fb784
test: improve test-http-allow-req-after-204-res
edsadr 0aa900f
test: avoid assigning this to variables
cjihrig 823bcd6
test: update test-cluster-shared-handle-bind-error
cjihrig c6cb93f
test: add tests for clearBuffer state machine
captainsafia 0ef4ea6
doc: add joyeecheung to collaborators
joyeecheung 2b6581c
vm: add error message if we abort
fhinkel 69c2ea9
test: add stdin-setrawmode.out file
a5fdd6a
test: set stdin too for pseudo-tty tests
addaleax 1d7d640
doc: update CONTRIBUTING.MD with link to V8 guide
sarahmeyer ababc8a
test: use mustCall() for simple flow tracking
cjihrig f4e76eb
test: refactor test-tls-server-verify
42a52c0
test: refactor test-net-dns-custom-lookup
funkent beffa82
test: refactor test-repl-mode.js
cesarhq 7492d3b
test: use common.fixturesDir almost everywhere
bengl 657d3f3
test: test: refactor test-sync-fileread
jhwohlgemuth fb9a704
test: refactor test-tls-0-dns-altname
6625373
tools: add ESLint rule for assert.throws arguments
targos f0ede65
tools: forbid template literals in assert.throws
targos 87463bf
test: add second argument to assert.throws()
russokj 869b0a6
test: refactoring test-pipe-head
furnox 2c33751
test: invalid package.json causes error when require()ing in directory
50f7e2f
test: refactor test-preload
Trott fa8f128
lib,test: use consistent operator linebreak style
targos 84b312c
tools: enforce consistent operator linebreak style
targos f5c57c7
test: cleanup stream tests
c55ad84
test: fix test-child-process-flush-stdio on win
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
test: fix test-child-process-flush-stdio on win
This test cases tries to use the V6 "shell:true" option on child_process.spawn that isn't in V4, therefore the test failes when there is no "echo.exe" on Windows systems. This fix implements the same functionality (cmd/c echo) that the shell:true option would have given.
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,10 +4,14 @@ const common = require('../common'); | |
| const assert = require('assert'); | ||
|
|
||
| // Windows' `echo` command is a built-in shell command and not an external | ||
| // executable like on *nix | ||
| const opts = { shell: common.isWindows }; | ||
|
|
||
| const p = cp.spawn('echo', [], opts); | ||
| // executable like on *nix. The V4 API does not have the "shell" option to | ||
| // spawn that we use in V4 and later so we can't use that here. | ||
| var p; | ||
| if (common.isWindows) { | ||
| p = cp.spawn('cmd.exe', ['/c', 'echo'], {}); | ||
| } else { | ||
| p = cp.spawn('echo', [], {}); | ||
| } | ||
|
|
||
| p.on('close', common.mustCall(function(code, signal) { | ||
| assert.strictEqual(code, 0); | ||
|
|
@@ -19,7 +23,12 @@ p.stdout.read(); | |
|
|
||
| function spawnWithReadable() { | ||
| const buffer = []; | ||
| const p = cp.spawn('echo', ['123'], opts); | ||
| var p; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above |
||
| if (common.isWindows) { | ||
| p = cp.spawn('cmd.exe', ['/c', 'echo', '123'], {}); | ||
| } else { | ||
| p = cp.spawn('echo', ['123'], {}); | ||
| } | ||
| p.on('close', common.mustCall(function(code, signal) { | ||
| assert.strictEqual(code, 0); | ||
| assert.strictEqual(signal, null); | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use
let phere so this doesn't cause conflicts when/if #10685 is backported?