(fx, platform, arch, env = {})
| 56 | } |
| 57 | |
| 58 | function binaryPath(fx, platform, arch, env = {}) { |
| 59 | // Inherit the environment: under Bazel, process.execPath is a launcher that |
| 60 | // needs the JS_BINARY__* variables to find the real node. |
| 61 | const childEnv = { ...process.env, NODE_PATH: fx.modules, FAKE_PLATFORM: platform, FAKE_ARCH: arch, ...env } |
| 62 | if (!('SE_MANAGER_PATH' in env)) { |
| 63 | delete childEnv.SE_MANAGER_PATH |
| 64 | } |
| 65 | const result = spawnSync( |
| 66 | process.execPath, |
| 67 | ['-r', fx.shim, '-e', `process.stdout.write(require(${JSON.stringify(INDEX)}).binaryPath())`], |
| 68 | { |
| 69 | encoding: 'utf8', |
| 70 | env: childEnv, |
| 71 | }, |
| 72 | ) |
| 73 | return { path: result.stdout, error: result.stderr, status: result.status } |
| 74 | } |
| 75 | |
| 76 | const CASES = [ |
| 77 | ['linux', 'x64', '@selenium/manager-linux-x64', 'selenium-manager'], |
no outgoing calls
no test coverage detected