Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove include_yamltests arg, and always install the whl for python tests #29456

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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