diff --git a/src/components/rpgUnit.ts b/src/components/rpgUnit.ts index 93666f1..ffa1ed6 100644 --- a/src/components/rpgUnit.ts +++ b/src/components/rpgUnit.ts @@ -184,7 +184,7 @@ export class RPGUnit implements IBMiComponent { 'MBROPT': `*REPLACE` }); Logger.log(LogLevel.Info, `Transferring RPGUNIT save file to ${config.tempLibrary}.LIB: ${transferCommand}`); - const transferResult = await connection.runCommand({ command: transferCommand, environment: `ile`, noLibList: true }); + const transferResult = await connection.runCommand({ command: transferCommand, environment: `system`, noLibList: true }); if (transferResult.code !== 0) { Logger.logWithNotification(LogLevel.Error, `Failed to transfer save file`, transferResult.stderr); return state; @@ -198,7 +198,7 @@ export class RPGUnit implements IBMiComponent { 'RSTLIB': productLibrary }); Logger.log(LogLevel.Info, `Restoring RPGUNIT save file contents into ${productLibrary}.LIB: ${restoreCommand}`); - const restoreResult = await connection.runCommand({ command: restoreCommand, environment: `ile`, noLibList: true }); + const restoreResult = await connection.runCommand({ command: restoreCommand, environment: `system`, noLibList: true }); if (restoreResult.code !== 0) { Logger.logWithNotification(LogLevel.Error, `Failed to restore save file contents`, restoreResult.stderr); return state; diff --git a/src/runner.ts b/src/runner.ts index 9f7e5e0..fca5a20 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -324,7 +324,8 @@ export class IBMiTestRunner { let testResult: any; try { const env = workspaceFolder ? (await Utils.getEnvConfig(workspaceFolder)) : {}; - testResult = await connection.runCommand({ command: testCommand, environment: `ile`, env: env }); + const environment = isCodeCoverageEnabled ? 'system' : 'ile'; + testResult = await connection.runCommand({ command: testCommand, environment: environment, env: env }); } catch (error: any) { if (isTestCase) { TestLogger.logTestCaseErrored(run, item, this.metrics, undefined, undefined, [{ message: error.message ? error.message : error }]);