Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Errors
-
CI results over the last 21 days739Runs96.35%Pass26Failures1Timeouts0Crashes186Skips
Runs with issues per day (up to 22.6%) Nov 7Nov 27- Failures
- Timeouts
Scheduled runs skipped per day (up to 22.8%) Nov 7Nov 27 - This test gets skipped with pattern: os == 'android' OR os == 'win' && msix
- This test failed 5 times in the preceding 30 days. quicksearch this test
- Manifest: js/xpconnect/tests/unit/xpcshell.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
const { Subprocess } = ChromeUtils.importESModule(
"resource://gre/modules/Subprocess.sys.mjs"
);
// Running xpcshell without a script argument and with a non-tty stdin makes it
// read the script from stdin without a file name.
add_task(async function test_script_from_piped_stdin() {
const xpcshell = Services.dirsvc.get("XREExeF", Ci.nsIFile);
const greDir = Services.dirsvc.get("GreD", Ci.nsIFile);
const proc = await Subprocess.call({
command: xpcshell.path,
arguments: ["-g", greDir.path],
stderr: "stdout",
});
await proc.stdin.write("print('piped-stdin-ok');\n");
await proc.stdin.close();
let output = "";
let chunk;
while ((chunk = await proc.stdout.readString())) {
output += chunk;
}
const { exitCode } = await proc.wait();
Assert.equal(exitCode, 0, `xpcshell exited cleanly, output: ${output}`);
Assert.stringContains(output, "piped-stdin-ok");
});