Skip to content

Commit

Permalink
Do not install matter yamltests in env (this has sideffects and cause… (
Browse files Browse the repository at this point in the history
#25022)

* Do not install matter yamltests in env (this has sideffects and causes codegen.py confusion)

* Attempt to make yamltester be able to sort its imports if they do not exist in the current environment

---------

Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 5, 2024
1 parent 9eb40cc commit 4aabc27
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 1 addition & 4 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
}

pw_python_pip_install("pip_install_matter_packages") {
packages = [
"//examples/common/pigweed/rpc_console:chip_rpc_distribution",
"//scripts:matter_yamltests_distribution",
]
packages = [ "//examples/common/pigweed/rpc_console:chip_rpc_distribution" ]
}

# Python packages installed during bootstrap.
Expand Down
13 changes: 13 additions & 0 deletions scripts/tests/chiptest/yamltest_with_chip_repl_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@

# isort: on

# ensure matter IDL is availale for import, otherwise set relative paths
try:
from matter_idl import matter_idl_types
except:
SCRIPT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))
import sys

sys.path.append(os.path.join(SCRIPT_PATH, 'py_matter_idl'))
sys.path.append(os.path.join(SCRIPT_PATH, 'py_matter_yamltests'))

from matter_idl import matter_idl_types


import chip.CertificateAuthority
import chip.native
import click
Expand Down

0 comments on commit 4aabc27

Please sign in to comment.