()
| 663 | } |
| 664 | |
| 665 | async function launchDesktopApp() { |
| 666 | if (desktopExecPath) { |
| 667 | const stdoutPath = outputPath("desktop-launch-exec", "stdout"); |
| 668 | const stderrPath = outputPath("desktop-launch-exec", "stderr"); |
| 669 | summary.desktop.execStdoutPath = stdoutPath; |
| 670 | summary.desktop.execStderrPath = stderrPath; |
| 671 | const stdoutFd = fs.openSync(stdoutPath, "a"); |
| 672 | const stderrFd = fs.openSync(stderrPath, "a"); |
| 673 | const child = spawn(desktopExecPath, [], { |
| 674 | cwd: root, |
| 675 | env: process.env, |
| 676 | detached: true, |
| 677 | stdio: ["ignore", stdoutFd, stderrFd], |
| 678 | }); |
| 679 | fs.closeSync(stdoutFd); |
| 680 | fs.closeSync(stderrFd); |
| 681 | child.unref(); |
| 682 | summary.desktop.execPid = child.pid; |
| 683 | await sleep( |
| 684 | Number(process.env.CAP_VERIFY_DESKTOP_LAUNCH_WAIT_MS || "5000"), |
| 685 | ); |
| 686 | return; |
| 687 | } |
| 688 | |
| 689 | if (!desktopAppPath) { |
| 690 | return; |
| 691 | } |
| 692 | |
| 693 | await runCommand("desktop-launch-app", "open", [desktopAppPath]); |
| 694 | await sleep(Number(process.env.CAP_VERIFY_DESKTOP_LAUNCH_WAIT_MS || "5000")); |
| 695 | } |
| 696 | |
| 697 | async function waitForDesktopProject(before) { |
| 698 | const deadline = |
no test coverage detected