Skip to content

Commit

Permalink
WEBUI-1601: revert code ftest stops if any case fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkumar1019 committed Nov 18, 2024
1 parent 6443393 commit eadcc10
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions scripts/test-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const FTEST = path.join(__dirname, '../ftest');
function runFunctionalTests(project, dir) {
if (!fs.existsSync(dir)) {
console.warn(`The directory "${dir}" doesn't exist, no tests will run for "${project}".`);
return false;
return;
}
console.info(`Starting Functional Tests for "${project}" on "${dir}" location.`);
const ftestArgs = [...process.argv, '--cucumberReport', path.join(FTEST, 'target/cucumber-reports')];
Expand All @@ -21,30 +21,16 @@ function runFunctionalTests(project, dir) {
console.error(`An error was returned by the process running the Functional Tests for "${project}".`);
process.exit(run.status);
}
return true;
}

if (fs.existsSync(path.join(FTEST, 'target/cucumber-reports')) && process.env.CUCUMBER_REPORT_PATH) {
removeSync(process.env.CUCUMBER_REPORT_PATH);
}

if (!args.skipWebUi) {
if (!runFunctionalTests('WebUI', FTEST)) {
process.exit(1);
}
runFunctionalTests('WebUI', FTEST);
}

const addons = (process.env.NUXEO_PACKAGES || '')
(process.env.NUXEO_PACKAGES || '')
.split(/[\s,]+/)
.filter(Boolean);

let hasFailed = false;

addons.forEach((addon) => {
if (hasFailed) return;
const addonDir = path.join(__dirname, `../addons/${addon}/ftest`);
if (!runFunctionalTests(addon, addonDir)) {
hasFailed = true;
process.exit(1);
}
});
.filter(Boolean)
.forEach((addon) => runFunctionalTests(addon, path.join(__dirname, `../addons/${addon}/ftest`)));

0 comments on commit eadcc10

Please sign in to comment.