Skip to content

Commit 87accc7

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into dev
2 parents 0d11a6d + 097a20b commit 87accc7

File tree

331 files changed

+56112
-15728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+56112
-15728
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ obj/
1515
dist/
1616
MANIFEST
1717
build_scripts/windows/out
18+
cli-build-*/
1819

1920
# Result of running python setup.py install/pip install -e
2021
RECORD.txt
@@ -23,6 +24,7 @@ build/
2324

2425
# Test results
2526
TestResults/
27+
test_failures.txt
2628

2729
# Credentials
2830
credentials_real.json

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
python: 3.6
2424
- stage: verify
2525
env: PURPOSE='Automation'
26-
script: ./scripts/ci/test_automation.sh
26+
script: travis_wait 30 ./scripts/ci/test_automation.sh
2727
python: 3.6
2828
- stage: verify
2929
env: PURPOSE='Automation'
30-
script: ./scripts/ci/test_automation.sh
30+
script: travis_wait 30 ./scripts/ci/test_automation.sh
3131
python: 2.7
3232
- stage: verify
3333
script: ./scripts/ci/test_static.sh

appveyor-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ on_success:
6363
{
6464
$folderPath = [System.IO.Path]::Combine("$env:TEMP\azure-cli-content", $folder)
6565
$subFolders = Get-ChildItem -Path $folderPath -Directory -Name
66-
if ($subFolders -contains "$env:YML_OUTPUT_FOLDER" -and $subFolders -contains "$env:CONCEPTUAL_DOC_FOLDER")
66+
if ($subFolders -contains "$env:YML_OUTPUT_FOLDER")
6767
{
6868
$docsRefAutogenFolder = [System.IO.Path]::Combine($folderPath, "$env:YML_OUTPUT_FOLDER")
6969
Get-ChildItem -Path $docsRefAutogenFolder | Remove-Item -Force -Recurse

appveyor-mooncake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ build_script:
5353
{
5454
$folderPath = [System.IO.Path]::Combine("$env:TEMP\azure-cli-content", $folder)
5555
$subFolders = Get-ChildItem -Path $folderPath -Directory -Name
56-
if ($subFolders -contains "$env:YML_OUTPUT_FOLDER" -and $subFolders -contains "$env:CONCEPTUAL_DOC_FOLDER")
56+
if ($subFolders -contains "$env:YML_OUTPUT_FOLDER")
5757
{
5858
$docsRefAutogenFolder = [System.IO.Path]::Combine($folderPath, "$env:YML_OUTPUT_FOLDER")
5959
Get-ChildItem -Path $docsRefAutogenFolder | Remove-Item -Force -Recurse

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ on_success:
6363
{
6464
$folderPath = [System.IO.Path]::Combine("$env:TEMP\azure-cli-content", $folder)
6565
$subFolders = Get-ChildItem -Path $folderPath -Directory -Name
66-
if ($subFolders -contains "$env:YML_OUTPUT_FOLDER" -and $subFolders -contains "$env:CONCEPTUAL_DOC_FOLDER")
66+
if ($subFolders -contains "$env:YML_OUTPUT_FOLDER")
6767
{
6868
$docsRefAutogenFolder = [System.IO.Path]::Combine($folderPath, "$env:YML_OUTPUT_FOLDER")
6969
Get-ChildItem -Path $docsRefAutogenFolder | Remove-Item -Force -Recurse

azure-cli2017.pyproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<Compile Include="azure-cli-core\azure\cli\core\tests\test_storage_validators.py" />
6565
<Compile Include="azure-cli-core\azure\cli\core\tests\test_telemetry.py" />
6666
<Compile Include="azure-cli-core\azure\cli\core\tests\test_util.py" />
67-
<Compile Include="azure-cli-core\azure\cli\core\tests\test_validators.py" />
67+
<Compile Include="azure-cli-core\azure\cli\core\tests\test_core_validators.py" />
6868
<Compile Include="azure-cli-core\azure\cli\core\util.py" />
6969
<Compile Include="azure-cli-core\azure\cli\core\_config.py" />
7070
<Compile Include="azure-cli-core\azure\cli\core\_debug.py" />
@@ -85,7 +85,6 @@
8585
<Compile Include="azure-cli-testsdk\azure\cli\testsdk\patches.py" />
8686
<Compile Include="azure-cli-testsdk\azure\cli\testsdk\preparers.py" />
8787
<Compile Include="azure-cli-testsdk\azure\cli\testsdk\utilities.py" />
88-
<Compile Include="azure-cli-testsdk\azure\cli\testsdk\vcr_test_base.py" />
8988
<Compile Include="azure-cli-testsdk\azure\cli\testsdk\__init__.py" />
9089
<Compile Include="azure-cli-testsdk\setup.py" />
9190
<Compile Include="azure-cli\azure\cli\__init__.py" />
@@ -396,7 +395,7 @@
396395
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\commands.py" />
397396
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\custom.py" />
398397
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\tests\latest\test_lab.py" />
399-
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\tests\latest\test_validators.py" />
398+
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\tests\latest\test_lab_validators.py" />
400399
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\validators.py" />
401400
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\_client_factory.py" />
402401
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\_format.py" />
@@ -449,7 +448,7 @@
449448
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\_template_builder.py" />
450449
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\_util.py" />
451450
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\_validators.py" />
452-
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\tests\latest\test_custom.py" />
451+
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\tests\latest\test_profile_custom.py" />
453452
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\_completers.py" />
454453
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\_format.py" />
455454
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\_help.py">
@@ -489,7 +488,7 @@
489488
<Compile Include="command_modules\azure-cli-reservations\azure_bdist_wheel.py" />
490489
<Compile Include="command_modules\azure-cli-reservations\setup.py" />
491490
<Compile Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\latest\test_api_check.py" />
492-
<Compile Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\latest\test_custom.py" />
491+
<Compile Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\latest\test_resource_custom.py" />
493492
<Compile Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\latest\test_locks.py" />
494493
<Compile Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\latest\test_resource.py" />
495494
<Compile Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\tests\latest\test_resource_id_deletes.py" />
@@ -503,7 +502,7 @@
503502
<Compile Include="command_modules\azure-cli-resource\azure\cli\command_modules\resource\_params.py" />
504503
<Compile Include="command_modules\azure-cli-role\azure\cli\command_modules\role\custom.py" />
505504
<Compile Include="command_modules\azure-cli-role\azure\cli\command_modules\role\tests\latest\role_scenario_test.py" />
506-
<Compile Include="command_modules\azure-cli-role\azure\cli\command_modules\role\tests\latest\test_custom.py" />
505+
<Compile Include="command_modules\azure-cli-role\azure\cli\command_modules\role\tests\latest\test_role_custom.py" />
507506
<Compile Include="command_modules\azure-cli-role\azure\cli\command_modules\role\tests\latest\test_graph.py" />
508507
<Compile Include="command_modules\azure-cli-role\azure\cli\command_modules\role\tests\latest\test_role.py" />
509508
<Compile Include="command_modules\azure-cli-role\azure\cli\command_modules\role\tests\latest\test_role_commands_thru_mock.py" />

build_scripts/debian/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tmp_pkg_dir=$(mktemp -d)
2929
working_dir=$(mktemp -d)
3030
cd $working_dir
3131
source_dir=$local_repo
32-
deb_file=$local_repo/../azure-cli_${CLI_VERSION}-1_all.deb
32+
deb_file=$local_repo/../azure-cli_${CLI_VERSION}-${CLI_VERSION_REVISION:=1}_all.deb
3333
az_completion_file=$source_dir/az.completion
3434
# clean up old build output
3535
if [ -d "$source_dir/debian" ]
@@ -73,7 +73,7 @@ $debian_directory_creator $cli_debian_dir_tmp $az_completion_file $source_dir
7373
cp -r $cli_debian_dir_tmp/* $source_dir/debian
7474
cd $source_dir
7575
dpkg-buildpackage -us -uc
76-
echo "The archive is available at $working_dir/azure-cli_${CLI_VERSION}-1_all.deb"
76+
echo "The archive is available at $working_dir/azure-cli_${CLI_VERSION}-${CLI_VERSION_REVISION:=1}_all.deb"
7777
cp $deb_file ${BUILD_ARTIFACT_DIR}
7878
echo "The archive has also been copied to ${BUILD_ARTIFACT_DIR}"
7979
echo "Done."

build_scripts/debian/dir_creator.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ echo '1.0' > $debian_dir/source/format
3939
echo '9' > $debian_dir/compat
4040

4141
cat > $debian_dir/changelog <<- EOM
42-
azure-cli (${CLI_VERSION}-1) unstable; urgency=low
42+
azure-cli (${CLI_VERSION}-${CLI_VERSION_REVISION:=1}) unstable; urgency=low
4343
4444
* Debian package release.
4545
@@ -58,7 +58,7 @@ Homepage: https://github.com/azure/azure-cli
5858
5959
Package: azure-cli
6060
Architecture: all
61-
Depends: \${misc:Depends}
61+
Depends: \${shlibs:Depends}, \${misc:Depends}
6262
Description: Azure CLI 2.0
6363
A great cloud needs great tools; we're excited to introduce Azure CLI 2.0,
6464
our next generation multi-platform command line experience for Azure.
@@ -90,9 +90,15 @@ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
9090
9191
EOM
9292

93+
# TODO: Instead of "_ssl.cpython-36m-x86_64-linux-gnu.so" only, find all .so files with "find debian/azure-cli/opt/az -type f -name '*.so'"
94+
9395
cat > $debian_dir/rules << EOM
9496
#!/usr/bin/make -f
9597
98+
# Uncomment this to turn on verbose mode.
99+
export DH_VERBOSE=1
100+
export DH_OPTIONS=-v
101+
96102
%:
97103
${TAB}dh \$@ --sourcedirectory $source_dir
98104
@@ -104,11 +110,15 @@ ${TAB}echo "\043!/usr/bin/env bash\n/opt/az/bin/python3 -Im azure.cli \"\044\100
104110
${TAB}chmod 0755 debian/azure-cli/usr/bin/az
105111
${TAB}mkdir -p debian/azure-cli/etc/bash_completion.d/
106112
${TAB}cat ${completion_script} > debian/azure-cli/etc/bash_completion.d/azure-cli
113+
${TAB}dpkg-shlibdeps -v --warnings=7 -Tdebian/azure-cli.substvars -dDepends -edebian/azure-cli/opt/az/bin/python3 debian/azure-cli/opt/az/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so
114+
107115
108116
override_dh_strip:
109117
${TAB}dh_strip --exclude=_cffi_backend
110118
111119
EOM
112120

121+
cat $debian_dir/rules
122+
113123
# debian/rules should be executable
114124
chmod 0755 $debian_dir/rules

doc/authoring_command_modules/README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,23 +155,28 @@ Testing
155155
Run all tests in a module:
156156

157157
```
158-
run_tests --module <module> [--live] [--parallel]
158+
azdev test --modules <modules> [--live] [--series] [--discover] [--dest-file FILENAME]
159159
```
160160

161161
Run an individual test:
162162

163163
```
164-
run_tests --module <module> --test <file>.<class>[.<test>]
164+
azdev test --tests TEST [TEST ...] [--live] [--series] [--discover] [--dest-file FILENAME]
165165
```
166-
For example `run_tests --module mymod --test test_myfoo.MyFooTests.test_myfoo`
166+
For example `azdev test --tests test_myfoo`
167167

168+
The list of failed tests are displayed at the end of a run and dumped to the file specified with `--dest-file` or `test_failures.txt` if nothing is provided. This allows for conveniently replaying failed tests:
169+
170+
```
171+
azdev test --src-file test_failures.txt [--live] [--series] [--discover]
172+
```
173+
174+
Relying on the default filename, the list of failed tests should grow shorter as you fix the cause of the failures until there are no more failing tests.
168175

169176
Style Checks
170177
------------
171178

172179
```
173-
check_style --module <module> [--pylint] [--pep8]
174-
OR
175180
azdev style --module <module> [--pylint] [--pep8]
176181
```
177182

0 commit comments

Comments
 (0)