forked from Azure/azure-iot-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_packages.py
More file actions
22 lines (18 loc) · 833 Bytes
/
test_packages.py
File metadata and controls
22 lines (18 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Run tests on all packages, and write output
"""
import glob
import os
from subprocess import check_call
if __name__ == "__main__":
# All packages in the monorepo
packages = [os.path.dirname(p) for p in glob.glob("azure*/setup.py")]
for package_name in packages:
command = "pytest {} --junitxml=junit/{}-test-results.xml --cov=azure --cov-report=xml:coverage.xml --cov-report=html:coverage --cov-append".format(
package_name, package_name
)
check_call(command.split())