feat: add gcov support

This commit is contained in:
Tom Hu
2022-04-04 16:14:50 -04:00
parent f32b3a3741
commit f37520c6b0
10 changed files with 75 additions and 7 deletions

View File

@@ -35,6 +35,10 @@ test('all arguments', () => {
'flags': 'test,test2',
'functionalities':
'network',
'gcov': 'true',
'gcov_args': '-v',
'gcov_ignore': '*.fake',
'gcov_include': 'real_file',
'move_coverage_to_trash': 'true',
'name': 'codecov',
'override_branch': 'thomasrockhu/test',
@@ -80,6 +84,13 @@ test('all arguments', () => {
'test',
'-F',
'test2',
'-g',
'-ga',
'-v',
'-gi',
'*.fake',
'-gI',
'real_file',
'-B',
'thomasrockhu/test',
'-b',

View File

@@ -25,6 +25,10 @@ const buildExec = () => {
const file = core.getInput('file');
const files = core.getInput('files');
const flags = core.getInput('flags');
const gcov = core.getInput('gcov');
const gcovArgs = core.getInput('gcov_args');
const gcovIgnore = core.getInput('gcov_ignore');
const gcovInclude = core.getInput('gcov_include');
const functionalities = core.getInput('functionalities');
const name = core.getInput('name');
const os = core.getInput('os');
@@ -105,6 +109,20 @@ const buildExec = () => {
execArgs.push('-F', `${f}`);
});
}
if (gcov) {
execArgs.push('-g');
}
if (gcovArgs) {
execArgs.push('-ga', `${gcovArgs}`);
}
if (gcovIgnore) {
execArgs.push('-gi', `${gcovIgnore}`);
}
if (gcovInclude) {
execArgs.push('-gI', `${gcovInclude}`);
}
if (overrideBranch) {
execArgs.push('-B', `${overrideBranch}`);
}