forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- License check: Handle \r\n and \n - Index check: Reject https://pypi.python.org urls - Source tests: Install extension in its own dir before running test for extension
- Loading branch information
1 parent
3485e34
commit 1a107e1
Showing
5 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ __pycache__/ | |
# Distribution / packaging | ||
.Python | ||
env/ | ||
env27/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
set -ex | ||
|
||
# Install CLI & CLI testsdk | ||
echo "Installing azure-cli-testsdk and azure-cli..." | ||
pip install "git+https://github.com/Azure/azure-cli@dev#egg=azure-cli-testsdk&subdirectory=src/azure-cli-testsdk" -q | ||
# TODO Update the git commit when we need a new version of azure-cli-testsdk | ||
pip install "git+https://github.com/Azure/azure-cli@68460748e47f20cba462686c9fd20d2c720cf98c#egg=azure-cli-testsdk&subdirectory=src/azure-cli-testsdk" -q | ||
echo "Installed." | ||
|
||
|
||
_AZURE_EXTENSION_DIR="$AZURE_EXTENSION_DIR" | ||
|
||
for d in src/*/azext_*/tests; | ||
do echo "Running tests for $d"; | ||
if [ -d $d ]; then | ||
export AZURE_EXTENSION_DIR=$(mktemp -d); | ||
pip install --upgrade --target $AZURE_EXTENSION_DIR/ext $d/../..; | ||
python -m unittest discover -v $d; | ||
rm -rf $AZURE_EXTENSION_DIR; | ||
else | ||
echo "Skipped $d as not a directory." | ||
fi | ||
done; | ||
|
||
if ! [ -z "${_AZURE_EXTENSION_DIR+_}" ] ; then | ||
AZURE_EXTENSION_DIR="$_AZURE_EXTENSION_DIR" | ||
export AZURE_EXTENSION_DIR | ||
unset _AZURE_EXTENSION_DIR | ||
fi | ||
|
||
echo "OK. Completed tests." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters