File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,6 +297,29 @@ function runE2eTestCb {
297297 fi
298298}
299299
300+ function runGen2MigrationsE2ETestCb {
301+ _setupCoverage
302+ FAILED_TEST_REGEX_FILE=" ./amplify-migration-e2e-reports/amplify-migration-e2e-failed-test.txt"
303+
304+ if [ -f $FAILED_TEST_REGEX_FILE ]; then
305+ # read the content of failed tests
306+ failedTests=$( < $FAILED_TEST_REGEX_FILE )
307+ if [[ ! -z " $DISABLE_COVERAGE " ]]; then
308+ echo Running WITHOUT coverage
309+ yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t " $failedTests "
310+ else
311+ NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e-migration --forceExit --no-cache --maxWorkers=4 $TEST_SUITE -t " $failedTests "
312+ fi
313+ else
314+ if [[ ! -z " $DISABLE_COVERAGE " ]]; then
315+ echo Running WITHOUT coverage
316+ yarn e2e --forceExit --no-cache --maxWorkers=4 $TEST_SUITE
317+ else
318+ NODE_V8_COVERAGE=$E2E_TEST_COVERAGE_DIR yarn e2e-migration --forceExit --no-cache --maxWorkers=4 $TEST_SUITE
319+ fi
320+ fi
321+ }
322+
300323function _setupCoverage {
301324 _teardownCoverage
302325 echo " Setup Coverage ($E2E_TEST_COVERAGE_DIR )"
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ artifacts:
4242 files :
4343 - ' $E2E_TEST_COVERAGE_DIR/*'
4444 - amplify-e2e-reports/*
45- base-directory : packages/amplify-e2e-tests /
45+ base-directory : packages/amplify-migration-e2e /
4646reports :
4747 e2e-reports :
4848 files :
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ function _runGen2MigrationE2ETestsLinux {
367367 amplify version
368368 cd packages/amplify-migration-e2e
369369 _loadTestAccountCredentials
370- retry runE2eTestCb
370+ retry runGen2MigrationsE2ETestCb
371371}
372372
373373function _unassumeTestAccountCredentials {
You can’t perform that action at this time.
0 commit comments