mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Don't symlink compile-cache folder in AtomWindow tests
In these tests, we create a temporary `ATOM_HOME` to avoid cluttering the user's real `~/.atom` folder. Adding a symlink to the real `compile-cache` was introduced to speed up main process tests, so that the transpilation cache could be reused. Unfortunately, when the real `~/.atom` folder did not exist (such as on a pristine environment on CI), it would confuse Atom, which would think that it didn't need to re-create a `compile-cache` folder again, but wouldn't be able to write to it because the symlink pointed to a non-existant directory. Main process tests were overhauled and made faster recently, so we can safely remove this performance optimization.
This commit is contained in:
@@ -200,10 +200,8 @@ function testSuitesForPlatform (platform) {
|
||||
case 'darwin':
|
||||
const PACKAGES_TO_TEST_IN_PARALLEL = 23
|
||||
|
||||
if (process.env.ATOM_RUN_CORE_MAIN_TESTS === 'true') {
|
||||
suites = [runCoreMainProcessTests]
|
||||
} else if (process.env.ATOM_RUN_CORE_RENDERER_TESTS === 'true') {
|
||||
suites = [runCoreRenderProcessTests]
|
||||
if (process.env.ATOM_RUN_CORE_TESTS === 'true') {
|
||||
suites = [runCoreMainProcessTests, runCoreRenderProcessTests]
|
||||
} else if (process.env.ATOM_RUN_PACKAGE_TESTS === '1') {
|
||||
suites = packageTestSuites.slice(0, PACKAGES_TO_TEST_IN_PARALLEL)
|
||||
} else if (process.env.ATOM_RUN_PACKAGE_TESTS === '2') {
|
||||
|
||||
@@ -62,46 +62,6 @@ jobs:
|
||||
ATOM_MAC_CODE_SIGNING_KEYCHAIN: $(ATOM_MAC_CODE_SIGNING_KEYCHAIN)
|
||||
ATOM_MAC_CODE_SIGNING_KEYCHAIN_PASSWORD: $(ATOM_MAC_CODE_SIGNING_KEYCHAIN_PASSWORD)
|
||||
|
||||
- script: |
|
||||
osascript -e 'tell application "System Events" to keystroke "x"' # clear screen saver
|
||||
caffeinate -s script/test # Run with caffeinate to prevent screen saver
|
||||
env:
|
||||
CI: true
|
||||
CI_PROVIDER: VSTS
|
||||
ATOM_JASMINE_REPORTER: list
|
||||
TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)/junit
|
||||
ATOM_RUN_CORE_MAIN_TESTS: true
|
||||
displayName: Run main process tests
|
||||
condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))
|
||||
|
||||
- script: script/postprocess-junit-results --search-folder "${TEST_JUNIT_XML_ROOT}" --test-results-files "**/*.xml"
|
||||
env:
|
||||
TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)/junit
|
||||
displayName: Post-process test results
|
||||
condition: ne(variables['Atom.SkipTests'], 'true')
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFormat: JUnit
|
||||
searchFolder: $(Common.TestResultsDirectory)/junit
|
||||
testResultsFiles: "**/*.xml"
|
||||
mergeTestResults: true
|
||||
testRunTitle: MacOS
|
||||
condition: ne(variables['Atom.SkipTests'], 'true')
|
||||
|
||||
- script: |
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/crash-reports
|
||||
cp ${HOME}/Library/Logs/DiagnosticReports/*.crash $(Build.ArtifactStagingDirectory)/crash-reports
|
||||
displayName: Stage Crash Reports
|
||||
condition: failed()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: $(Build.ArtifactStagingDirectory)/crash-reports
|
||||
ArtifactName: crash-reports.zip
|
||||
displayName: Upload Crash Reports
|
||||
condition: failed()
|
||||
|
||||
- script: |
|
||||
cp $(Build.SourcesDirectory)/out/*.zip $(Build.ArtifactStagingDirectory)
|
||||
displayName: Stage Artifacts
|
||||
@@ -140,13 +100,13 @@ jobs:
|
||||
maxParallel: 3
|
||||
matrix:
|
||||
core:
|
||||
RunCoreRendererTests: true
|
||||
RunCoreTests: true
|
||||
RunPackageTests: false
|
||||
packages-1:
|
||||
RunCoreRendererTests: false
|
||||
RunCoreTests: false
|
||||
RunPackageTests: 1
|
||||
packages-2:
|
||||
RunCoreRendererTests: false
|
||||
RunCoreTests: false
|
||||
RunPackageTests: 2
|
||||
|
||||
steps:
|
||||
@@ -188,7 +148,7 @@ jobs:
|
||||
CI_PROVIDER: VSTS
|
||||
ATOM_JASMINE_REPORTER: list
|
||||
TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)/junit
|
||||
ATOM_RUN_CORE_RENDERER_TESTS: $(RunCoreRendererTests)
|
||||
ATOM_RUN_CORE_TESTS: $(RunCoreTests)
|
||||
ATOM_RUN_PACKAGE_TESTS: $(RunPackageTests)
|
||||
displayName: Run tests
|
||||
condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))
|
||||
|
||||
Reference in New Issue
Block a user