Skip to content

Commit

Permalink
Remove include_yamltests arg, and always install the whl for python t…
Browse files Browse the repository at this point in the history
…ests (#29456)

* Remove include_yamltests arg, and install always for python tests

* CI fixes

* CI fixes
  • Loading branch information
tehampson authored and pull[bot] committed Feb 26, 2024
1 parent 286b07f commit 1291067
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:
"
- name: Build Apps
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv --include_yamltests'
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \
Expand Down
20 changes: 7 additions & 13 deletions scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Input Options:
src/python_testing scripts.
Defaults to yes.
--extra_packages PACKAGES Install extra Python packages from PyPI
--include_yamltests Whether to install the matter_yamltests wheel.
-z --pregen_dir DIRECTORY Directory where generated zap files have been pre-generated.
"
}
Expand Down Expand Up @@ -129,9 +128,6 @@ while (($#)); do
extra_packages=$2
shift
;;
--include_yamltests)
include_yamltests="yes"
;;
--pregen_dir | -z)
pregen_dir=$2
shift
Expand Down Expand Up @@ -187,15 +183,6 @@ else
WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl)
fi

if [ -n "$include_yamltests" ]; then
YAMLTESTS_GN_LABEL="//scripts:matter_yamltests_distribution._build_wheel"

# Add wheels from pw_python_package or pw_python_distribution templates.
WHEEL+=(
"$(ls -tr "$(wheel_output_dir "$YAMLTESTS_GN_LABEL")"/*.whl | head -n 1)"
)
fi

if [ -n "$extra_packages" ]; then
WHEEL+=("$extra_packages")
fi
Expand All @@ -217,7 +204,14 @@ if [ -n "$install_virtual_env" ]; then
"$ENVIRONMENT_ROOT"/bin/pip install --upgrade "${WHEEL[@]}"

if [ "$install_pytest_requirements" = "yes" ]; then
YAMLTESTS_GN_LABEL="//scripts:matter_yamltests_distribution._build_wheel"
# Add wheels from pw_python_package or pw_python_distribution templates.
YAMLTEST_WHEEL=(
"$(ls -tr "$(wheel_output_dir "$YAMLTESTS_GN_LABEL")"/*.whl | head -n 1)"
)

echo_blue "Installing python test dependencies ..."
"$ENVIRONMENT_ROOT"/bin/pip install --upgrade "${YAMLTEST_WHEEL[@]}"
"$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/scripts/tests/requirements.txt"
"$ENVIRONMENT_ROOT"/bin/pip install -r "$CHIP_ROOT/src/python_testing/requirements.txt"
fi
Expand Down

0 comments on commit 1291067

Please sign in to comment.