(testFileName: string, workspaceFolder: string, cliHost: CLIHost, injectedEnv: { [varName: string]: string | boolean } = {})
| 594 | } |
| 595 | |
| 596 | async function execTest(testFileName: string, workspaceFolder: string, cliHost: CLIHost, injectedEnv: { [varName: string]: string | boolean } = {}) { |
| 597 | // Ensure all the tests scripts in the workspace folder are executable |
| 598 | // Update permissions on the copied files to make them readable/writable/executable by everyone |
| 599 | await cliHost.exec({ cmd: 'chmod', args: ['-R', '777', workspaceFolder], output: nullLog }); |
| 600 | |
| 601 | const cmd = `./${testFileName}`; |
| 602 | const args: string[] = []; |
| 603 | return await exec(cmd, args, workspaceFolder, injectedEnv); |
| 604 | } |
| 605 | |
| 606 | async function exec(cmd: string, args: string[], workspaceFolder: string, injectedEnv: { [name: string]: string | boolean } = {}) { |
| 607 | const injectedEnvArray = Object.keys(injectedEnv).length > 0 |
no test coverage detected