Skip to content

Commit 707dad2

Browse files
Added fixes as per module build for metadata_testing_infrastructure
1 parent b54c27a commit 707dad2

File tree

9 files changed

+86
-82
lines changed

9 files changed

+86
-82
lines changed

BUILD.gn

+3-2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
6767
"//examples/common/pigweed/rpc_console/py:chip_rpc",
6868
"//integrations/mobly:chip_mobly",
6969
"//scripts/py_matter_yamltests:matter_yamltests",
70+
"//scripts/tests/py:matter_testing_infrastructure",
7071
]
7172

7273
pw_python_venv("matter_build_venv") {
@@ -106,7 +107,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
106107
if (chip_enable_python_modules) {
107108
deps = [
108109
"${chip_root}/scripts:matter_yamltests_distribution.wheel",
109-
"${chip_root}/scripts/tests/py:metadata_parser.wheel",
110+
"${chip_root}/scripts/tests/py:matter_testing_infrastructure.wheel",
110111
"${chip_root}/src/controller/python:chip-repl",
111112
]
112113
if (enable_pylib) {
@@ -233,7 +234,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
233234
"//scripts/build:build_examples.tests",
234235
"//scripts/py_matter_idl:matter_idl.tests",
235236
"//scripts/py_matter_yamltests:matter_yamltests.tests",
236-
"//scripts/tests/py:metadata_parser.tests",
237+
"//scripts/tests/py:matter_testing_infrastructure.tests",
237238
"//src:tests_run",
238239
]
239240

scripts/build_python.sh

+75-72
Original file line numberDiff line numberDiff line change
@@ -80,78 +80,78 @@ file_name=${0##*/}
8080

8181
while (($#)); do
8282
case $1 in
83-
--help | -h)
84-
help
85-
exit 1
86-
;;
87-
--enable_ble | -b)
88-
enable_ble=$2
89-
if [[ "$enable_ble" != "true" && "$enable_ble" != "false" ]]; then
90-
echo "chip_detail_logging should have a true/false value, not '$enable_ble'"
91-
exit
92-
fi
93-
shift
94-
;;
95-
--chip_detail_logging | -d)
96-
chip_detail_logging=$2
97-
if [[ "$chip_detail_logging" != "true" && "$chip_detail_logging" != "false" ]]; then
98-
echo "chip_detail_logging should have a true/false value, not '$chip_detail_logging'"
99-
exit
100-
fi
101-
shift
102-
;;
103-
--chip_mdns | -m)
104-
chip_mdns=$2
105-
shift
106-
;;
107-
--enable_pybindings | -p)
108-
enable_pybindings=$2
109-
if [[ "$enable_pybindings" != "true" && "$enable_pybindings" != "false" ]]; then
110-
echo "enable_pybindings should have a true/false value, not '$enable_pybindings'"
111-
exit
112-
fi
113-
shift
114-
;;
115-
--time_between_case_retries | -t)
116-
chip_case_retry_delta=$2
117-
shift
118-
;;
119-
--install_virtual_env | -i)
120-
install_virtual_env=$2
121-
shift
122-
;;
123-
--clean_virtual_env | -c)
124-
clean_virtual_env=$2
125-
if [[ "$clean_virtual_env" != "yes" && "$clean_virtual_env" != "no" ]]; then
126-
echo "clean_virtual_env should have a yes/no value, not '$clean_virtual_env'"
127-
exit
128-
fi
129-
shift
130-
;;
131-
--include_pytest_deps)
132-
install_pytest_requirements=$2
133-
if [[ "$install_pytest_requirements" != "yes" && "$install_pytest_requirements" != "no" ]]; then
134-
echo "install_pytest_requirements should have a yes/no value, not '$install_pytest_requirements'"
135-
exit
136-
fi
137-
shift
138-
;;
139-
--extra_packages)
140-
extra_packages=$2
141-
shift
142-
;;
143-
--pregen_dir | -z)
144-
pregen_dir=$2
145-
shift
146-
;;
147-
--jupyter-lab | -j)
148-
install_jupyterlab=yes
149-
;;
150-
-*)
151-
help
152-
echo "Unknown Option \"$1\""
153-
exit 1
154-
;;
83+
--help | -h)
84+
help
85+
exit 1
86+
;;
87+
--enable_ble | -b)
88+
enable_ble=$2
89+
if [[ "$enable_ble" != "true" && "$enable_ble" != "false" ]]; then
90+
echo "chip_detail_logging should have a true/false value, not '$enable_ble'"
91+
exit
92+
fi
93+
shift
94+
;;
95+
--chip_detail_logging | -d)
96+
chip_detail_logging=$2
97+
if [[ "$chip_detail_logging" != "true" && "$chip_detail_logging" != "false" ]]; then
98+
echo "chip_detail_logging should have a true/false value, not '$chip_detail_logging'"
99+
exit
100+
fi
101+
shift
102+
;;
103+
--chip_mdns | -m)
104+
chip_mdns=$2
105+
shift
106+
;;
107+
--enable_pybindings | -p)
108+
enable_pybindings=$2
109+
if [[ "$enable_pybindings" != "true" && "$enable_pybindings" != "false" ]]; then
110+
echo "enable_pybindings should have a true/false value, not '$enable_pybindings'"
111+
exit
112+
fi
113+
shift
114+
;;
115+
--time_between_case_retries | -t)
116+
chip_case_retry_delta=$2
117+
shift
118+
;;
119+
--install_virtual_env | -i)
120+
install_virtual_env=$2
121+
shift
122+
;;
123+
--clean_virtual_env | -c)
124+
clean_virtual_env=$2
125+
if [[ "$clean_virtual_env" != "yes" && "$clean_virtual_env" != "no" ]]; then
126+
echo "clean_virtual_env should have a yes/no value, not '$clean_virtual_env'"
127+
exit
128+
fi
129+
shift
130+
;;
131+
--include_pytest_deps)
132+
install_pytest_requirements=$2
133+
if [[ "$install_pytest_requirements" != "yes" && "$install_pytest_requirements" != "no" ]]; then
134+
echo "install_pytest_requirements should have a yes/no value, not '$install_pytest_requirements'"
135+
exit
136+
fi
137+
shift
138+
;;
139+
--extra_packages)
140+
extra_packages=$2
141+
shift
142+
;;
143+
--pregen_dir | -z)
144+
pregen_dir=$2
145+
shift
146+
;;
147+
--jupyter-lab | -j)
148+
install_jupyterlab=yes
149+
;;
150+
-*)
151+
help
152+
echo "Unknown Option \"$1\""
153+
exit 1
154+
;;
155155
esac
156156
shift
157157
done
@@ -212,6 +212,9 @@ else
212212
WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl)
213213
fi
214214

215+
# Add the matter_testing_infrastructure wheel
216+
WHEEL+=("$OUTPUT_ROOT"/python/obj/scripts/tests/py/matter_testing_infrastructure._build_wheel/matter_testing_infrastructure-*.whl)
217+
215218
if [ -n "$extra_packages" ]; then
216219
WHEEL+=("$extra_packages")
217220
fi

scripts/tests/py/BUILD.gn

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import("//build_overrides/chip.gni")
1818
import("//build_overrides/pigweed.gni")
1919
import("$dir_pw_build/python.gni")
2020

21-
pw_python_package("metadata_parser") {
21+
pw_python_package("matter_testing_infrastructure") {
2222
setup = [
2323
"setup.py",
2424
"setup.cfg",
@@ -28,9 +28,9 @@ pw_python_package("metadata_parser") {
2828
inputs = [ "env_test.yaml" ]
2929

3030
sources = [
31-
"metadata_parser/__init__.py",
32-
"metadata_parser/metadata.py",
31+
"matter_testing_infrastructure/__init__.py",
32+
"matter_testing_infrastructure/metadata.py",
3333
]
3434

35-
tests = [ "metadata_parser/test_metadata.py" ]
35+
tests = [ "matter_testing_infrastructure/test_metadata.py" ]
3636
}

scripts/tests/py/setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
[metadata]
16-
name = metadata_parser
16+
name = matter_testing_infrastructure
1717
version = 0.0.1
1818
author = Project CHIP Authors
19-
description = Scripts to get metadata (runner arguments) associated with the python_testing scripts
19+
description = Scripts to get metadata (runner arguments) associated with the python_testing scripts

scripts/tests/py/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515

16-
"""The metadata_parser package."""
16+
"""The matter_testing_infrastructure package."""
1717

1818
import setuptools # type: ignore
1919

scripts/tests/run_python_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import click
3333
import coloredlogs
3434
from colorama import Fore, Style
35-
from py.metadata_parser.metadata import Metadata, MetadataReader
35+
from matter_testing_infrastructure.metadata import Metadata, MetadataReader
3636

3737
DEFAULT_CHIP_ROOT = os.path.abspath(
3838
os.path.join(os.path.dirname(__file__), '..', '..'))

0 commit comments

Comments
 (0)