diff --git a/.github/workflows/e2ePerformanceTests.yml b/.github/workflows/e2ePerformanceTests.yml index 7d1f0cf9575d..4e48e9856b28 100644 --- a/.github/workflows/e2ePerformanceTests.yml +++ b/.github/workflows/e2ePerformanceTests.yml @@ -181,12 +181,11 @@ jobs: test_spec_file: tests/e2e/TestSpecMain.yml test_spec_type: APPIUM_NODE_TEST_SPEC remote_src: false - file_artifacts: Customer Artifacts.zip + file_artifacts: MainArtifacts.zip cleanup: true - name: Unzip AWS Device Farm main results - if: ${{ always() }} - run: unzip "Customer Artifacts.zip" -d mainResults + run: unzip MainArtifacts.zip -d mainResults - name: Schedule AWS Device Farm test run on delta branch uses: realm/aws-devicefarm/test-application@7b9a91236c456c97e28d384c9e476035d5ea686b @@ -202,21 +201,16 @@ jobs: test_spec_file: tests/e2e/TestSpecDelta.yml test_spec_type: APPIUM_NODE_TEST_SPEC remote_src: false - file_artifacts: Customer Artifacts.zip + file_artifacts: DeltaArtifacts.zip cleanup: true - name: Unzip AWS Device Farm delta results - if: ${{ always() }} - run: unzip "Customer Artifacts.zip" -d deltaResults - + run: unzip DeltaArtifacts.zip -d deltaResults - name: Compare results - if: ${{ always() }} run: node "./Host_Machine_File/tests/e2e/merge.js --mainPath ../../mainResults/\$WORKING_DIRECTORY/main.json --deltaPath ../../deltaResults/\$WORKING_DIRECTORY/delta.json --outputPath ./Host_Machine_Files/output.md" - - name: Print results - if: ${{ always() }} run: cat "./Host_Machine_Files/output.md" # - name: Print AWS Device Farm verbose run results diff --git a/tests/e2e/testRunner.js b/tests/e2e/testRunner.js index 116be8e8e4e7..96858494b683 100644 --- a/tests/e2e/testRunner.js +++ b/tests/e2e/testRunner.js @@ -71,15 +71,11 @@ if (args.includes('--config')) { setConfigPath(configPath); } -// Clear all files from previous jobs -if (!fs.existsSync(config.OUTPUT_DIR)) { - fs.mkdirSync(config.OUTPUT_DIR); -} - try { - if (fs.existsSync(`${config.OUTPUT_DIR}/${label}.json`)) { - fs.rmSync(`${config.OUTPUT_DIR}/${label}.json`); - } + // Clear all files from previous jobs + fs.rmSync(config.OUTPUT_DIR, {recursive: true, force: true}); + + fs.mkdirSync(config.OUTPUT_DIR); } catch (error) { // Do nothing console.error(error);