From a692077fe80eb3a1b7f77e0418a593f456ca4246 Mon Sep 17 00:00:00 2001 From: liuzhe Date: Wed, 18 Nov 2020 12:06:10 +0800 Subject: [PATCH 1/4] debug mac ut --- pipelines/fast-test.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pipelines/fast-test.yml b/pipelines/fast-test.yml index 5a0607eab0..0da37c9948 100644 --- a/pipelines/fast-test.yml +++ b/pipelines/fast-test.yml @@ -131,12 +131,21 @@ jobs: # This platform runs TypeScript unit test first. steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: 3.8 + displayName: Configure Python + - script: | set -e - export PYTHON38_BIN_DIR=/usr/local/Cellar/python@3.8/`ls /usr/local/Cellar/python@3.8`/bin - echo "##vso[task.setvariable variable=PATH]${PYTHON38_BIN_DIR}:${HOME}/Library/Python/3.8/bin:${PATH}" - python3 -m pip install -U --upgrade pip setuptools - python3 -m pip install -U pytest coverage + echo ${PATH} + python --version + python -c 'import sys ; print(sys.executable)' + python -c 'import site ; print(site.getsitepackages())' + python -c 'import site ; print(site.getusersitepackages())' + + python -m pip install -U --upgrade pip setuptools + python -m pip install -U pytest coverage displayName: 'Install Python tools' - script: | @@ -145,10 +154,9 @@ jobs: - script: | set -e - cd ts/nni_manager - yarn test - cd ../nasui - CI=true yarn test + export CI=true + (cd ts/nni_manager && yarn test) + (cd ts/nasui && yarn test) displayName: 'TypeScript unit test' - script: | From 85c8e2ebccd27a5a393751390bf574a562132190 Mon Sep 17 00:00:00 2001 From: liuzhe Date: Wed, 18 Nov 2020 12:29:43 +0800 Subject: [PATCH 2/4] debug --- pipelines/fast-test.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pipelines/fast-test.yml b/pipelines/fast-test.yml index 0da37c9948..b3cc2a1725 100644 --- a/pipelines/fast-test.yml +++ b/pipelines/fast-test.yml @@ -143,21 +143,31 @@ jobs: python -c 'import sys ; print(sys.executable)' python -c 'import site ; print(site.getsitepackages())' python -c 'import site ; print(site.getusersitepackages())' + echo $USER + (cd ~ && pwd) - python -m pip install -U --upgrade pip setuptools + ls /Users/runner/hostedtoolcache/Python/3.8.6/x64 + ls /Users/runner/.local + + python -m pip install -U --upgrade pip setuptools wheel python -m pip install -U pytest coverage displayName: 'Install Python tools' - script: | python3 setup.py develop + + echo 'vvv Find nnictl #1 vvv' + find /Users/runner/hostedtoolcache/Python/3.8.6/x64 -name nnictl + echo 'vvv Find nnictl #2 vvv' + find /Users/runner/.local -name nnictl displayName: 'Install NNI' - - script: | - set -e - export CI=true - (cd ts/nni_manager && yarn test) - (cd ts/nasui && yarn test) - displayName: 'TypeScript unit test' + #- script: | + # set -e + # export CI=true + # (cd ts/nni_manager && yarn test) + # (cd ts/nasui && yarn test) + # displayName: 'TypeScript unit test' - script: | set -e From 4db2e51f26d856ed1c8a5aa66d5176ec1d7c54e0 Mon Sep 17 00:00:00 2001 From: liuzhe-lz <40699903+liuzhe-lz@users.noreply.github.com> Date: Wed, 18 Nov 2020 12:45:44 +0800 Subject: [PATCH 3/4] Update fast-test.yml for Azure Pipelines --- pipelines/fast-test.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/pipelines/fast-test.yml b/pipelines/fast-test.yml index b3cc2a1725..cf2219404d 100644 --- a/pipelines/fast-test.yml +++ b/pipelines/fast-test.yml @@ -138,28 +138,13 @@ jobs: - script: | set -e - echo ${PATH} - python --version - python -c 'import sys ; print(sys.executable)' - python -c 'import site ; print(site.getsitepackages())' - python -c 'import site ; print(site.getusersitepackages())' - echo $USER - (cd ~ && pwd) - - ls /Users/runner/hostedtoolcache/Python/3.8.6/x64 - ls /Users/runner/.local - + echo "##vso[task.setvariable variable=PATH]${PATH}:${HOME}/.local/bin" python -m pip install -U --upgrade pip setuptools wheel python -m pip install -U pytest coverage displayName: 'Install Python tools' - script: | python3 setup.py develop - - echo 'vvv Find nnictl #1 vvv' - find /Users/runner/hostedtoolcache/Python/3.8.6/x64 -name nnictl - echo 'vvv Find nnictl #2 vvv' - find /Users/runner/.local -name nnictl displayName: 'Install NNI' #- script: | From bb16c62b4b0a4c9cd0175b7e88bb86aa87385d51 Mon Sep 17 00:00:00 2001 From: liuzhe-lz <40699903+liuzhe-lz@users.noreply.github.com> Date: Wed, 18 Nov 2020 12:57:58 +0800 Subject: [PATCH 4/4] Update fast-test.yml for Azure Pipelines --- pipelines/fast-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pipelines/fast-test.yml b/pipelines/fast-test.yml index cf2219404d..6e98935673 100644 --- a/pipelines/fast-test.yml +++ b/pipelines/fast-test.yml @@ -147,12 +147,12 @@ jobs: python3 setup.py develop displayName: 'Install NNI' - #- script: | - # set -e - # export CI=true - # (cd ts/nni_manager && yarn test) - # (cd ts/nasui && yarn test) - # displayName: 'TypeScript unit test' + - script: | + set -e + export CI=true + (cd ts/nni_manager && yarn test) + (cd ts/nasui && yarn test) + displayName: 'TypeScript unit test' - script: | set -e