From d572f82c35c844738b7af59ccd638d1af7f0dafe Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 11:12:41 -0700 Subject: [PATCH 1/8] Autorest changes for V3 --- eng/pipelines/autorest_checks.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml index 6b7897ce4299..bdbb139a471d 100644 --- a/eng/pipelines/autorest_checks.yml +++ b/eng/pipelines/autorest_checks.yml @@ -17,8 +17,9 @@ variables: NodeVersion: '10.x' PythonVersion: '3.6' auto_rest_clone_url: 'https://github.com/Azure/autorest.python.git' - repo_branch: 'azure-core' - source_path: 'sdk/core/azure-core' + repo_branch: 'autorestv3' + source_path_azure_core: 'sdk/core/azure-core' + source_path_azure_mgmt_core: 'sdk/core/azure-mgmt-core' jobs: - job: 'Run_AutoRest' @@ -40,13 +41,18 @@ jobs: - script: | pip install -r eng/autorest_req.txt - pip install $(Build.SourcesDirectory)/$(source_path) + pip install $(Build.SourcesDirectory)/$(source_path_azure_core) displayName: 'Prepare Environment' - script: | - git clone --recursive $(auto_rest_clone_url) + git clone $(auto_rest_clone_url) cd autorest.python git checkout $(repo_branch) npm install pytest test/vanilla - displayName: 'Run Test' \ No newline at end of file + displayName: 'Run Test Vanilla' + + - script: | + pip install $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) + pytest test/azure + displayName: 'Run Test Azure' \ No newline at end of file From 5cd939eeac47f53dcdff17ba923cfddd7175934c Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 11:25:49 -0700 Subject: [PATCH 2/8] Autorest changes for V3 --- eng/pipelines/autorest_checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml index bdbb139a471d..2faaf27f7230 100644 --- a/eng/pipelines/autorest_checks.yml +++ b/eng/pipelines/autorest_checks.yml @@ -49,8 +49,8 @@ jobs: cd autorest.python git checkout $(repo_branch) npm install - pytest test/vanilla - displayName: 'Run Test Vanilla' + pytest test/vanila + displayName: 'Run Test Vanila' - script: | pip install $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) From 66142f3ed63841177cde276d83905c86c0f28a0b Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 11:32:05 -0700 Subject: [PATCH 3/8] Fix test name --- eng/autorest_req.txt | 3 ++- eng/pipelines/autorest_checks.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eng/autorest_req.txt b/eng/autorest_req.txt index e2808bca4ecf..b9f608c81eaa 100644 --- a/eng/autorest_req.txt +++ b/eng/autorest_req.txt @@ -4,4 +4,5 @@ pytest-cov==2.8.1 pytest-asyncio==0.10.0; python_version >= '3.5' isodate==0.6.0 msrest==0.6.13 -aiohttp==3.6.2 \ No newline at end of file +aiohttp==3.6.2 +wheel \ No newline at end of file diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml index 2faaf27f7230..bdbb139a471d 100644 --- a/eng/pipelines/autorest_checks.yml +++ b/eng/pipelines/autorest_checks.yml @@ -49,8 +49,8 @@ jobs: cd autorest.python git checkout $(repo_branch) npm install - pytest test/vanila - displayName: 'Run Test Vanila' + pytest test/vanilla + displayName: 'Run Test Vanilla' - script: | pip install $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) From af277d7c35b85defc890e2b223ced01c97f0a4c9 Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 12:49:13 -0700 Subject: [PATCH 4/8] Install required packages --- eng/pipelines/autorest_checks.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml index bdbb139a471d..abf41e55036e 100644 --- a/eng/pipelines/autorest_checks.yml +++ b/eng/pipelines/autorest_checks.yml @@ -41,18 +41,21 @@ jobs: - script: | pip install -r eng/autorest_req.txt - pip install $(Build.SourcesDirectory)/$(source_path_azure_core) - displayName: 'Prepare Environment' - - - script: | git clone $(auto_rest_clone_url) cd autorest.python git checkout $(repo_branch) npm install + cd test/vanilla + pip install -r requirements.txt + displayName: 'Prepare Environment' + + - script: | + pip install --force-reinstall $(Build.SourcesDirectory)/$(source_path_azure_core) + cd $(Build.SourcesDirectory)/autorest.python pytest test/vanilla - displayName: 'Run Test Vanilla' + displayName: 'Install azure-core and Test Vanilla' - script: | - pip install $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) + pip install --force-reinstall $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) pytest test/azure - displayName: 'Run Test Azure' \ No newline at end of file + displayName: 'Install azure-mgmt-core and Test Azure' \ No newline at end of file From 3a577563e1ace8730f6ce32c11835f700d3ac46a Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 12:55:23 -0700 Subject: [PATCH 5/8] Set path for azure test --- eng/pipelines/autorest_checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml index abf41e55036e..d560949a4b90 100644 --- a/eng/pipelines/autorest_checks.yml +++ b/eng/pipelines/autorest_checks.yml @@ -57,5 +57,6 @@ jobs: - script: | pip install --force-reinstall $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) + cd $(Build.SourcesDirectory)/autorest.python pytest test/azure displayName: 'Install azure-mgmt-core and Test Azure' \ No newline at end of file From 4a9e662db46cbb64d84bfd176c892fe2e7e6e23b Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 13:29:34 -0700 Subject: [PATCH 6/8] Set path for azure test --- eng/pipelines/autorest_checks.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml index d560949a4b90..0b4cf124cb2d 100644 --- a/eng/pipelines/autorest_checks.yml +++ b/eng/pipelines/autorest_checks.yml @@ -45,18 +45,18 @@ jobs: cd autorest.python git checkout $(repo_branch) npm install - cd test/vanilla - pip install -r requirements.txt displayName: 'Prepare Environment' - script: | + cd $(Build.SourcesDirectory)/autorest.python/test/vanilla + pip install -r requirements.txt pip install --force-reinstall $(Build.SourcesDirectory)/$(source_path_azure_core) - cd $(Build.SourcesDirectory)/autorest.python - pytest test/vanilla + pytest $(Build.SourcesDirectory)/autorest.python/test/vanilla displayName: 'Install azure-core and Test Vanilla' - script: | + cd $(Build.SourcesDirectory)/autorest.python/test/azure + pip install -r requirements.txt pip install --force-reinstall $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) - cd $(Build.SourcesDirectory)/autorest.python - pytest test/azure + pytest $(Build.SourcesDirectory)/autorest.python/test/azure displayName: 'Install azure-mgmt-core and Test Azure' \ No newline at end of file From 749a63a777a85f2b80f77f386ac1f0f88e1769c1 Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 14:06:48 -0700 Subject: [PATCH 7/8] Remove force install and add pip freeze --- eng/pipelines/autorest_checks.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/autorest_checks.yml b/eng/pipelines/autorest_checks.yml index 0b4cf124cb2d..1828ccd317b0 100644 --- a/eng/pipelines/autorest_checks.yml +++ b/eng/pipelines/autorest_checks.yml @@ -49,14 +49,16 @@ jobs: - script: | cd $(Build.SourcesDirectory)/autorest.python/test/vanilla + pip install $(Build.SourcesDirectory)/$(source_path_azure_core) pip install -r requirements.txt - pip install --force-reinstall $(Build.SourcesDirectory)/$(source_path_azure_core) + pip freeze pytest $(Build.SourcesDirectory)/autorest.python/test/vanilla displayName: 'Install azure-core and Test Vanilla' - script: | - cd $(Build.SourcesDirectory)/autorest.python/test/azure + cd $(Build.SourcesDirectory)/autorest.python/test/azure + pip install $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) pip install -r requirements.txt - pip install --force-reinstall $(Build.SourcesDirectory)/$(source_path_azure_mgmt_core) + pip freeze pytest $(Build.SourcesDirectory)/autorest.python/test/azure displayName: 'Install azure-mgmt-core and Test Azure' \ No newline at end of file From fa76ac695313eb579cabea33ba89f0a338255000 Mon Sep 17 00:00:00 2001 From: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Wed, 29 Apr 2020 15:44:51 -0700 Subject: [PATCH 8/8] Touch core dev requirements file --- sdk/core/azure-core/dev_requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/azure-core/dev_requirements.txt b/sdk/core/azure-core/dev_requirements.txt index 8b52ac11404e..b90c3caa146b 100644 --- a/sdk/core/azure-core/dev_requirements.txt +++ b/sdk/core/azure-core/dev_requirements.txt @@ -6,4 +6,4 @@ typing_extensions>=3.7.2 opencensus>=0.6.0 opencensus-ext-azure>=0.3.1 opencensus-ext-threading -mock +mock \ No newline at end of file