2018-10-04 16:01:16 +00:00
|
|
|
steps:
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: 'Copy Files to: src/electron'
|
|
|
|
inputs:
|
|
|
|
TargetFolder: src/electron
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
cd src/electron
|
2019-06-14 18:24:40 +00:00
|
|
|
node script/yarn.js install --frozen-lockfile
|
|
|
|
displayName: 'Yarn install'
|
2018-10-04 16:01:16 +00:00
|
|
|
|
|
|
|
- bash: |
|
|
|
|
export ZIP_DEST=$PWD/src/out/Default
|
2018-11-30 16:17:01 +00:00
|
|
|
echo "##vso[task.setvariable variable=ZIP_DEST]$ZIP_DEST"
|
2018-10-04 16:01:16 +00:00
|
|
|
mkdir -p $ZIP_DEST
|
|
|
|
cd src/electron
|
|
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=dist.zip --dest=$ZIP_DEST
|
|
|
|
cd $ZIP_DEST
|
|
|
|
unzip -o dist.zip
|
|
|
|
displayName: 'Download and unzip dist files for test'
|
|
|
|
env:
|
|
|
|
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
|
|
|
|
|
2018-11-30 16:17:01 +00:00
|
|
|
- bash: |
|
|
|
|
export FFMPEG_ZIP_DEST=$PWD/src/out/ffmpeg
|
|
|
|
mkdir -p $FFMPEG_ZIP_DEST
|
|
|
|
cd src/electron
|
|
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=ffmpeg.zip --dest=$FFMPEG_ZIP_DEST
|
|
|
|
cd $FFMPEG_ZIP_DEST
|
|
|
|
unzip -o ffmpeg.zip
|
|
|
|
displayName: 'Download and unzip ffmpeg for test'
|
|
|
|
env:
|
|
|
|
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
|
|
|
|
|
2018-10-04 16:01:16 +00:00
|
|
|
- bash: |
|
|
|
|
export NODE_HEADERS_DEST=$PWD/src/out/Default/gen
|
|
|
|
mkdir -p $NODE_HEADERS_DEST
|
|
|
|
cd src/electron
|
|
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=node_headers.tar.gz --dest=$NODE_HEADERS_DEST
|
|
|
|
cd $NODE_HEADERS_DEST
|
|
|
|
tar xzf node_headers.tar.gz
|
|
|
|
displayName: 'Download and untar node header files for test'
|
|
|
|
env:
|
|
|
|
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
|
|
|
|
|
2019-03-28 15:05:43 +00:00
|
|
|
- bash: |
|
|
|
|
export CROSS_ARCH_SNAPSHOTS=$PWD/src/out/Default/cross-arch-snapshots
|
|
|
|
mkdir -p $CROSS_ARCH_SNAPSHOTS
|
|
|
|
cd src/electron
|
|
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/snapshot_blob.bin --dest=$CROSS_ARCH_SNAPSHOTS
|
|
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=cross-arch-snapshots/v8_context_snapshot.bin --dest=$CROSS_ARCH_SNAPSHOTS
|
|
|
|
displayName: 'Download cross arch snapshot files'
|
|
|
|
env:
|
|
|
|
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
|
|
|
|
|
2019-10-03 20:21:30 +00:00
|
|
|
- bash: |
|
|
|
|
export NATIVE_UNITTESTS_DEST=$PWD/src/out/Default
|
|
|
|
cd src/electron
|
|
|
|
node script/download-circleci-artifacts.js --buildNum=$CIRCLE_BUILD_NUM --name=shell_browser_ui_unittests --dest=$NATIVE_UNITTESTS_DEST
|
|
|
|
chmod +x $NATIVE_UNITTESTS_DEST/shell_browser_ui_unittests
|
|
|
|
displayName: 'Download native unittest executables'
|
|
|
|
env:
|
|
|
|
CIRCLE_TOKEN: $(CIRCLECI_TOKEN)
|
|
|
|
|
2018-10-04 16:01:16 +00:00
|
|
|
- bash: |
|
|
|
|
sh -e /etc/init.d/xvfb start
|
|
|
|
displayName: Setup for headless testing
|
|
|
|
env:
|
|
|
|
DISPLAY: ":99.0"
|
|
|
|
|
2019-02-13 17:07:18 +00:00
|
|
|
- bash: |
|
2019-07-19 23:15:47 +00:00
|
|
|
cd src
|
|
|
|
export ELECTRON_OUT_DIR=Default
|
|
|
|
(cd electron && node script/yarn test -- --ci --enable-logging)
|
2019-02-13 17:07:18 +00:00
|
|
|
displayName: 'Run Electron tests'
|
2019-07-19 23:15:47 +00:00
|
|
|
timeoutInMinutes: 20
|
2019-02-13 17:07:18 +00:00
|
|
|
env:
|
2019-07-03 01:22:09 +00:00
|
|
|
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
2019-07-19 23:15:47 +00:00
|
|
|
IGNORE_YARN_INSTALL_ERROR: 1
|
|
|
|
ELECTRON_TEST_RESULTS_DIR: junit
|
2019-02-13 17:07:18 +00:00
|
|
|
|
2018-11-30 16:17:01 +00:00
|
|
|
- bash: |
|
|
|
|
cd src
|
|
|
|
python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg
|
|
|
|
displayName: Verify non proprietary ffmpeg
|
|
|
|
timeoutInMinutes: 5
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
cd src
|
2019-03-28 15:05:43 +00:00
|
|
|
echo Verify cross arch snapshot
|
|
|
|
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/out/Default/cross-arch-snapshots
|
|
|
|
displayName: Verify cross arch snapshot
|
2018-11-30 16:17:01 +00:00
|
|
|
timeoutInMinutes: 5
|
|
|
|
|
2018-10-04 16:01:16 +00:00
|
|
|
- task: PublishTestResults@2
|
|
|
|
displayName: 'Publish Test Results'
|
|
|
|
inputs:
|
|
|
|
testResultsFiles: '*.xml'
|
|
|
|
|
|
|
|
searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/'
|
|
|
|
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
|
|
|
displayName: 'Clean Agent Directories'
|
|
|
|
|
|
|
|
condition: always()
|