renames to reflect the switch to using toolrunner
This commit is contained in:
parent
3cd41279f2
commit
88951d6193
11 changed files with 36 additions and 36 deletions
6
lib/codeql.js
generated
6
lib/codeql.js
generated
|
|
@ -22,7 +22,7 @@ const v4_1 = __importDefault(require("uuid/v4"));
|
|||
const api = __importStar(require("./api-client"));
|
||||
const defaults = __importStar(require("./defaults.json")); // Referenced from codeql-action-sync-tool!
|
||||
const error_matcher_1 = require("./error-matcher");
|
||||
const exec_wrapper_1 = require("./exec-wrapper");
|
||||
const toolrunner_error_catcher_1 = require("./toolrunner-error-catcher");
|
||||
const util = __importStar(require("./util"));
|
||||
/**
|
||||
* Stores the CodeQL object, and is populated by `setupCodeQL` or `getCodeQL`.
|
||||
|
|
@ -308,7 +308,7 @@ function getCodeQLForCmd(cmd) {
|
|||
const ext = process.platform === 'win32' ? '.cmd' : '.sh';
|
||||
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
||||
// Run trace command
|
||||
await exec_wrapper_1.execErrorCatcher(cmd, [
|
||||
await toolrunner_error_catcher_1.toolrunnerErrorCatcher(cmd, [
|
||||
'database',
|
||||
'trace-command',
|
||||
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
||||
|
|
@ -318,7 +318,7 @@ function getCodeQLForCmd(cmd) {
|
|||
], error_matcher_1.errorMatchers);
|
||||
},
|
||||
finalizeDatabase: async function (databasePath) {
|
||||
await exec_wrapper_1.execErrorCatcher(cmd, [
|
||||
await toolrunner_error_catcher_1.toolrunnerErrorCatcher(cmd, [
|
||||
'database',
|
||||
'finalize',
|
||||
...getExtraOptionsFromEnv(['database', 'finalize']),
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"exec-wrapper.js","sourceRoot":"","sources":["../src/exec-wrapper.ts"],"names":[],"mappings":";;;;;;;;;AACA,0EAA4D;AAI5D;;;;;;;;;;GAUG;AACI,KAAK,UAAU,gBAAgB,CAAC,WAAmB,E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U,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE;YACnD,IAAI,UAAU,KAAK,WAAW,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAG;gBACtF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;aAC1B;SACF;KACF;IAED,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,qFAAqF;QACrF,UAAI,OAAO,0CAAE,gBAAgB,EAAE;YAC7B,OAAO,WAAW,CAAC;SACpB;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,iBAAiB,WAAW,4BAA4B,WAAW,EAAE,CAAC,CAAC;SACxF;KACF;SAAM;QACL,MAAM,WAAW,CAAC;KACnB;AACH,CAAC;AAlED,4CAkEC"}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -19,7 +19,7 @@ const toolrunnner = __importStar(require("@actions/exec/lib/toolrunner"));
|
|||
* @param options optional exec options. See ExecOptions
|
||||
* @returns Promise<number> exit code
|
||||
*/
|
||||
async function execErrorCatcher(commandLine, args, matchers, options) {
|
||||
async function toolrunnerErrorCatcher(commandLine, args, matchers, options) {
|
||||
var _a;
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
|
|
@ -82,5 +82,5 @@ async function execErrorCatcher(commandLine, args, matchers, options) {
|
|||
throw returnState;
|
||||
}
|
||||
}
|
||||
exports.execErrorCatcher = execErrorCatcher;
|
||||
//# sourceMappingURL=exec-wrapper.js.map
|
||||
exports.toolrunnerErrorCatcher = toolrunnerErrorCatcher;
|
||||
//# sourceMappingURL=toolrunner-error-catcher.js.map
|
||||
1
lib/toolrunner-error-catcher.js.map
Normal file
1
lib/toolrunner-error-catcher.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"toolrunner-error-catcher.js","sourceRoot":"","sources":["../src/toolrunner-error-catcher.ts"],"names":[],"mappings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AAK,CAAC;QAAE,OAAO,WAAW,CAAC;IAE1C,IAAI,QAAQ,EAAE;QACZ,KAAK,MAAM,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,QAAQ,EAAE;YACnD,IAAI,UAAU,KAAK,WAAW,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAG;gBACtF,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;aAC1B;SACF;KACF;IAED,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,qFAAqF;QACrF,UAAI,OAAO,0CAAE,gBAAgB,EAAE;YAC7B,OAAO,WAAW,CAAC;SACpB;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,iBAAiB,WAAW,4BAA4B,WAAW,EAAE,CAAC,CAAC;SACxF;KACF;SAAM;QACL,MAAM,WAAW,CAAC;KACnB;AACH,CAAC;AAlED,wDAkEC"}
|
||||
|
|
@ -13,26 +13,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
const exec = __importStar(require("@actions/exec"));
|
||||
const toolrunnner = __importStar(require("@actions/exec/lib/toolrunner"));
|
||||
const ava_1 = __importDefault(require("ava"));
|
||||
const exec_wrapper_1 = require("./exec-wrapper");
|
||||
const testing_utils_1 = require("./testing-utils");
|
||||
const toolrunner_error_catcher_1 = require("./toolrunner-error-catcher");
|
||||
testing_utils_1.setupTests(ava_1.default);
|
||||
ava_1.default('matchers are never applied if non-error exit', async (t) => {
|
||||
const testArgs = buildDummyArgs("foo bar\\nblort qux", "foo bar\\nblort qux", '', 0);
|
||||
const matchers = [[123, new RegExp("foo bar"), 'error!!!']];
|
||||
t.deepEqual(await exec.exec('node', testArgs), 0);
|
||||
t.deepEqual(await exec_wrapper_1.execErrorCatcher('node', testArgs, matchers), 0);
|
||||
t.deepEqual(await toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, matchers), 0);
|
||||
});
|
||||
ava_1.default('regex matchers are applied to stdout for non-zero exit code', async (t) => {
|
||||
const testArgs = buildDummyArgs("foo bar\\nblort qux", '', '', 1);
|
||||
const matchers = [[123, new RegExp("foo bar"), '🦄']];
|
||||
await t.throwsAsync(exec.exec('node', testArgs), { instanceOf: Error, message: 'The process \'node\' failed with exit code 1' });
|
||||
await t.throwsAsync(exec_wrapper_1.execErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
});
|
||||
ava_1.default('regex matchers are applied to stderr for non-zero exit code', async (t) => {
|
||||
const testArgs = buildDummyArgs("non matching string", 'foo bar\\nblort qux', '', 1);
|
||||
const matchers = [[123, new RegExp("foo bar"), '🦄']];
|
||||
await t.throwsAsync(exec.exec('node', testArgs), { instanceOf: Error, message: 'The process \'node\' failed with exit code 1' });
|
||||
await t.throwsAsync(exec_wrapper_1.execErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
});
|
||||
ava_1.default('matcher returns correct error message when multiple matchers defined', async (t) => {
|
||||
const testArgs = buildDummyArgs("non matching string", 'foo bar\\nblort qux', '', 1);
|
||||
|
|
@ -40,7 +40,7 @@ ava_1.default('matcher returns correct error message when multiple matchers defi
|
|||
[123, new RegExp("foo bar"), '🦄'],
|
||||
[789, new RegExp("blah blah"), '🤦♂️']];
|
||||
await t.throwsAsync(exec.exec('node', testArgs), { instanceOf: Error, message: 'The process \'node\' failed with exit code 1' });
|
||||
await t.throwsAsync(exec_wrapper_1.execErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
});
|
||||
ava_1.default('matcher returns first match to regex when multiple matches', async (t) => {
|
||||
const testArgs = buildDummyArgs("non matching string", 'foo bar\\nblort qux', '', 1);
|
||||
|
|
@ -48,18 +48,18 @@ ava_1.default('matcher returns first match to regex when multiple matches', asyn
|
|||
[789, new RegExp("blah blah"), '🤦♂️'],
|
||||
[987, new RegExp("foo bar"), '🚫']];
|
||||
await t.throwsAsync(exec.exec('node', testArgs), { instanceOf: Error, message: 'The process \'node\' failed with exit code 1' });
|
||||
await t.throwsAsync(exec_wrapper_1.execErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
});
|
||||
ava_1.default('exit code matchers are applied', async (t) => {
|
||||
const testArgs = buildDummyArgs("non matching string", 'foo bar\\nblort qux', '', 123);
|
||||
const matchers = [[123, new RegExp("this will not match"), '🦄']];
|
||||
await t.throwsAsync(exec.exec('node', testArgs), { instanceOf: Error, message: 'The process \'node\' failed with exit code 123' });
|
||||
await t.throwsAsync(exec_wrapper_1.execErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, matchers), { instanceOf: Error, message: '🦄' });
|
||||
});
|
||||
ava_1.default('execErrorCatcher respects the ignoreReturnValue option', async (t) => {
|
||||
const testArgs = buildDummyArgs("standard output", 'error output', '', 199);
|
||||
await t.throwsAsync(exec_wrapper_1.execErrorCatcher('node', testArgs, [], { ignoreReturnCode: false }), { instanceOf: Error });
|
||||
t.deepEqual(await exec_wrapper_1.execErrorCatcher('node', testArgs, [], { ignoreReturnCode: true }), 199);
|
||||
await t.throwsAsync(toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, [], { ignoreReturnCode: false }), { instanceOf: Error });
|
||||
t.deepEqual(await toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, [], { ignoreReturnCode: true }), 199);
|
||||
});
|
||||
ava_1.default('execErrorCatcher preserves behavior of provided listeners', async (t) => {
|
||||
let stdoutExpected = 'standard output';
|
||||
|
|
@ -75,7 +75,7 @@ ava_1.default('execErrorCatcher preserves behavior of provided listeners', async
|
|||
}
|
||||
};
|
||||
const testArgs = buildDummyArgs(stdoutExpected, stderrExpected, '', 0);
|
||||
t.deepEqual(await exec_wrapper_1.execErrorCatcher('node', testArgs, [], { listeners: listeners }), 0);
|
||||
t.deepEqual(await toolrunner_error_catcher_1.toolrunnerErrorCatcher('node', testArgs, [], { listeners: listeners }), 0);
|
||||
t.deepEqual(stdoutActual, stdoutExpected + "\n");
|
||||
t.deepEqual(stderrActual, stderrExpected + "\n");
|
||||
});
|
||||
|
|
@ -93,4 +93,4 @@ function buildDummyArgs(stdoutContents, stderrContents, desiredErrorMessage, des
|
|||
command += 'process.exitCode = ' + desiredExitCode + ';';
|
||||
return toolrunnner.argStringToArray('-e "' + command + '"');
|
||||
}
|
||||
//# sourceMappingURL=exec-wrapper.test.js.map
|
||||
//# sourceMappingURL=toolrunner-error-catcher.test.js.map
|
||||
1
lib/toolrunner-error-catcher.test.js.map
Normal file
1
lib/toolrunner-error-catcher.test.js.map
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -12,9 +12,9 @@ import uuidV4 from 'uuid/v4';
|
|||
import * as api from './api-client';
|
||||
import * as defaults from './defaults.json'; // Referenced from codeql-action-sync-tool!
|
||||
import { errorMatchers} from './error-matcher';
|
||||
import { execErrorCatcher } from './exec-wrapper';
|
||||
import { Language } from './languages';
|
||||
import { Logger } from './logging';
|
||||
import { toolrunnerErrorCatcher } from './toolrunner-error-catcher';
|
||||
import * as util from './util';
|
||||
|
||||
type Options = (string|number|boolean)[];
|
||||
|
|
@ -425,7 +425,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
|||
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
||||
|
||||
// Run trace command
|
||||
await execErrorCatcher(
|
||||
await toolrunnerErrorCatcher(
|
||||
cmd, [
|
||||
'database',
|
||||
'trace-command',
|
||||
|
|
@ -438,7 +438,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
|||
);
|
||||
},
|
||||
finalizeDatabase: async function(databasePath: string) {
|
||||
await execErrorCatcher(
|
||||
await toolrunnerErrorCatcher(
|
||||
cmd, [
|
||||
'database',
|
||||
'finalize',
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import * as toolrunnner from '@actions/exec/lib/toolrunner';
|
|||
import test from 'ava';
|
||||
|
||||
import { ErrorMatcher } from './error-matcher';
|
||||
import { execErrorCatcher } from './exec-wrapper';
|
||||
import {setupTests} from './testing-utils';
|
||||
import { toolrunnerErrorCatcher } from './toolrunner-error-catcher';
|
||||
|
||||
setupTests(test);
|
||||
|
||||
|
|
@ -16,7 +16,7 @@ test('matchers are never applied if non-error exit', async t => {
|
|||
|
||||
t.deepEqual(await exec.exec('node', testArgs), 0);
|
||||
|
||||
t.deepEqual(await execErrorCatcher('node', testArgs, matchers), 0);
|
||||
t.deepEqual(await toolrunnerErrorCatcher('node', testArgs, matchers), 0);
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ test('regex matchers are applied to stdout for non-zero exit code', async t => {
|
|||
await t.throwsAsync(exec.exec('node', testArgs), {instanceOf: Error, message: 'The process \'node\' failed with exit code 1'});
|
||||
|
||||
await t.throwsAsync(
|
||||
execErrorCatcher('node', testArgs, matchers),
|
||||
toolrunnerErrorCatcher('node', testArgs, matchers),
|
||||
{instanceOf: Error, message: '🦄'}
|
||||
);
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ test('regex matchers are applied to stderr for non-zero exit code', async t => {
|
|||
await t.throwsAsync(exec.exec('node', testArgs), {instanceOf: Error, message: 'The process \'node\' failed with exit code 1'});
|
||||
|
||||
await t.throwsAsync(
|
||||
execErrorCatcher('node', testArgs, matchers),
|
||||
toolrunnerErrorCatcher('node', testArgs, matchers),
|
||||
{instanceOf: Error, message: '🦄'}
|
||||
);
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ test('matcher returns correct error message when multiple matchers defined', asy
|
|||
await t.throwsAsync(exec.exec('node', testArgs), {instanceOf: Error, message: 'The process \'node\' failed with exit code 1'});
|
||||
|
||||
await t.throwsAsync(
|
||||
execErrorCatcher('node', testArgs, matchers),
|
||||
toolrunnerErrorCatcher('node', testArgs, matchers),
|
||||
{instanceOf: Error, message: '🦄'}
|
||||
);
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ test('matcher returns first match to regex when multiple matches', async t => {
|
|||
await t.throwsAsync(exec.exec('node', testArgs), {instanceOf: Error, message: 'The process \'node\' failed with exit code 1'});
|
||||
|
||||
await t.throwsAsync(
|
||||
execErrorCatcher('node', testArgs, matchers),
|
||||
toolrunnerErrorCatcher('node', testArgs, matchers),
|
||||
{instanceOf: Error, message: '🦄'}
|
||||
);
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ test('exit code matchers are applied', async t => {
|
|||
await t.throwsAsync(exec.exec('node', testArgs), {instanceOf: Error, message: 'The process \'node\' failed with exit code 123'});
|
||||
|
||||
await t.throwsAsync(
|
||||
execErrorCatcher('node', testArgs, matchers),
|
||||
toolrunnerErrorCatcher('node', testArgs, matchers),
|
||||
{instanceOf: Error, message: '🦄'}
|
||||
);
|
||||
|
||||
|
|
@ -102,9 +102,9 @@ test('exit code matchers are applied', async t => {
|
|||
test('execErrorCatcher respects the ignoreReturnValue option', async t => {
|
||||
const testArgs = buildDummyArgs("standard output", 'error output', '', 199);
|
||||
|
||||
await t.throwsAsync(execErrorCatcher('node', testArgs, [], {ignoreReturnCode: false}), {instanceOf: Error});
|
||||
await t.throwsAsync(toolrunnerErrorCatcher('node', testArgs, [], {ignoreReturnCode: false}), {instanceOf: Error});
|
||||
|
||||
t.deepEqual(await execErrorCatcher('node', testArgs, [], {ignoreReturnCode: true}), 199);
|
||||
t.deepEqual(await toolrunnerErrorCatcher('node', testArgs, [], {ignoreReturnCode: true}), 199);
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ test('execErrorCatcher preserves behavior of provided listeners', async t => {
|
|||
|
||||
const testArgs = buildDummyArgs(stdoutExpected, stderrExpected, '', 0);
|
||||
|
||||
t.deepEqual(await execErrorCatcher('node', testArgs, [], {listeners: listeners}), 0);
|
||||
t.deepEqual(await toolrunnerErrorCatcher('node', testArgs, [], {listeners: listeners}), 0);
|
||||
|
||||
t.deepEqual(stdoutActual, stdoutExpected + "\n");
|
||||
t.deepEqual(stderrActual, stderrExpected + "\n");
|
||||
|
|
@ -14,9 +14,9 @@ import {ErrorMatcher} from './error-matcher';
|
|||
* @param options optional exec options. See ExecOptions
|
||||
* @returns Promise<number> exit code
|
||||
*/
|
||||
export async function execErrorCatcher(commandLine: string, args?: string[],
|
||||
matchers?: ErrorMatcher[],
|
||||
options?: im.ExecOptions): Promise<number> {
|
||||
export async function toolrunnerErrorCatcher(commandLine: string, args?: string[],
|
||||
matchers?: ErrorMatcher[],
|
||||
options?: im.ExecOptions): Promise<number> {
|
||||
|
||||
let stdout = '';
|
||||
let stderr = '';
|
||||
Loading…
Add table
Add a link
Reference in a new issue