Skip to content

Commit ea61b3f

Browse files
committed
combine logs, try to fix notebook/nteract issue
1 parent 18762e2 commit ea61b3f

File tree

16 files changed

+173
-40
lines changed

16 files changed

+173
-40
lines changed

anaconda-project.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,24 @@ commands:
3030
env_spec: rfjl37
3131

3232
atest:
33-
unix: rm -rf _artifacts/test_output && python -m scripts.atest
33+
unix: python -m scripts.atest
34+
env_spec: rfjl37
35+
36+
atest:full:
37+
unix: |-
38+
set -eux &&
39+
rm -rf _artifacts/test_output &&
40+
python -m scripts.atest &&
41+
BROWSER=headlesschrome python -m scripts.atest &&
42+
python -m scripts.combine
43+
env_spec: rfjl37
44+
45+
atest:clean:
46+
unix: rm -rf _artifacts/test_output
47+
env_spec: rfjl37
48+
49+
atest:combine:
50+
unix: python -m scripts.combine
3451
env_spec: rfjl37
3552

3653
atest:win:

atest/acceptance/01_server/00_basic.robot

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
*** Settings ***
2+
Suite Setup Create Directory ${LOGS}
23
Suite Teardown Terminate All Jupyter Servers
34
Force Tags server
45
Library JupyterLibrary
56
Library Process
67
Library OperatingSystem
78

9+
*** Variables ***
10+
${LOGS} ${OUTPUT_DIR}${/}${OS}${/}${BROWSER}${/}logs${/}
11+
812
*** Test Cases ***
913
Start one server
10-
${nbserver} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}one_server.log stderr=STDOUT
14+
${nbserver} = Start New Jupyter Server stdout=${LOGS}1.log stderr=STDOUT
1115
${ready} = Wait for Jupyter Server to be Ready
1216
Should be equal as integers ${ready} 1 msg=One server should be ready
1317
${terminated} = Terminate All Jupyter Servers
@@ -16,11 +20,12 @@ Start one server
1620
Should Contain ${log} The Jupyter Notebook is running msg=Log should contain expected status message
1721

1822
Start three servers
19-
${nb1} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}one_of_three_server.log stderr=STDOUT
20-
${nb2} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}two_of_three_server.log stderr=STDOUT
23+
[Setup] Create Directory ${LOGS}3
24+
${nb1} = Start New Jupyter Server stdout=${LOGS}3${/}1.log stderr=STDOUT
25+
${nb2} = Start New Jupyter Server stdout=${LOGS}3${/}2.log stderr=STDOUT
2126
${ready} = Wait for Jupyter Server to be Ready ${nb2} ${nb1}
2227
Should be equal as integers ${ready} 2 msg=Three servers should be ready
23-
${nb3} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}three_of_three_server.log stderr=STDOUT
28+
${nb3} = Start New Jupyter Server stdout=${LOGS}3${/}3.log stderr=STDOUT
2429
${terminated} = Terminate All Jupyter Servers
2530
Should be equal as integers ${terminated} 3 msg=Three servers should have been terminated
2631
${log1} = Get Process Result ${nb1} stderr=${True}
@@ -32,7 +37,7 @@ Start three servers
3237

3338
Server Files
3439
[Setup] Create File ${OUTPUT_DIR}${/}foo.txt bar
35-
${nb1} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}files.log stderr=STDOUT
40+
${nb1} = Start New Jupyter Server stdout=${LOGS}files.log stderr=STDOUT
3641
Copy Files to Jupyter Directory ${OUTPUT_DIR}${/}*.txt
3742
${nbdir} = Get Jupyter Directory ${nb1}
3843
${out} = Get File ${nbdir}${/}foo.txt

atest/acceptance/__init__.robot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*** Settings ***
2-
Suite Setup Set Screenshot Directory ${OUTPUT_DIR}${/}screenshots
2+
Suite Setup Set Screenshot Directory ${OUTPUT_DIR}${/}${OS}${/}${BROWSER}${/}screenshots
33
Suite Teardown Clean Up Everything
4+
Force Tags os:${OS} browser:${BROWSER}
45
Library JupyterLibrary
56
Library Process
67

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
22
Suite Setup Wait for New Jupyter Server to be Ready
33
Suite Teardown Terminate All Jupyter Servers
4-
Force Tags classic
4+
Force Tags client:notebook
55
Library JupyterLibrary
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
22
Suite Setup Wait for New Jupyter Server to be Ready
33
Suite Teardown Terminate All Jupyter Servers
4-
Force Tags jupyterlab
4+
Force Tags client:jupyterlab
55
Library JupyterLibrary
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Settings ***
22
Suite Setup Wait for New Jupyter Server to be Ready
33
Suite Teardown Terminate All Jupyter Servers
4-
Force Tags nteract
4+
Force Tags client:nteract_on_jupyter
55
Library JupyterLibrary

azure-pipelines.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
jobs:
2-
- template: ci/job.yml
2+
- template: ci/job.test.yml
33
parameters:
44
name: Linux
55
vmImage: ubuntu-16.04
66

7-
- template: ci/job.yml
7+
- template: ci/job.test.yml
88
parameters:
99
name: MacOSX
1010
vmImage: macos-10.13
1111

12-
- template: ci/job.yml
12+
- template: ci/job.test.yml
1313
parameters:
1414
name: Windows
1515
vmImage: vs2017-win2016
1616

17-
variables:
18-
MINICONDA_VERSION: 4.5.4
19-
CONDA_VERSION: 4.5.11
17+
- template: ci/job.combine.yml
18+
parameters:
19+
name: Linux
20+
vmImage: ubuntu-16.04
2021

2122
trigger: [master]
2223

ci/job.combine.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
parameters:
2+
name: Linux
3+
vmImage: ubuntu-16.04
4+
5+
jobs:
6+
- job: ${{ parameters.name }}
7+
pool:
8+
vmImage: ${{ parameters.vmImage }}
9+
dependsOn:
10+
- Linux
11+
- MacOSX
12+
- Windows
13+
steps:
14+
- task: DownloadPipelineArtifact@0
15+
inputs:
16+
artifactName: Linux Tests
17+
targetPath: _artifacts/test_output
18+
- task: DownloadPipelineArtifact@0
19+
inputs:
20+
artifactName: MacOSX Tests
21+
targetPath: _artifacts/test_output
22+
- task: DownloadPipelineArtifact@0
23+
inputs:
24+
artifactName: Windows Tests
25+
targetPath: _artifacts/test_output
26+
- template: steps.conda.yml
27+
parameters:
28+
name: Linux
29+
- script: python -m scripts.combine
30+
displayName: Rebot
31+
- task: PublishBuildArtifacts@1
32+
displayName: Publish Robot Logs
33+
inputs:
34+
PathtoPublish: _artifacts/test_output
35+
ArtifactName: Combined Robot Logs
36+
condition: always()

ci/job.yml renamed to ci/job.test.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,9 @@ jobs:
88
vmImage: ${{ parameters.vmImage }}
99

1010
steps:
11-
- ${{ if eq(parameters.name, 'MacOSX') }}:
12-
- script: |
13-
HOMEBREW_NO_AUTO_UPDATE=1 \
14-
brew tap caskroom/cask \
15-
&& brew cask install google-chrome \
16-
&& brew cask install firefox
17-
displayName: Install Browsers on MacOSX
11+
- template: steps.browser.yml
12+
parameters:
13+
name: ${{ parameters.name }}
1814

1915
- template: steps.conda.yml
2016
parameters:

ci/steps.browser.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
parameters:
2+
name: Linux
3+
4+
steps:
5+
- ${{ if eq(parameters.name, 'MacOSX') }}:
6+
- script: |
7+
HOMEBREW_NO_AUTO_UPDATE=1 \
8+
brew tap caskroom/cask \
9+
&& brew cask install google-chrome \
10+
&& brew cask install firefox
11+
displayName: Install Browsers on MacOSX

0 commit comments

Comments
 (0)