From e0141a97285a00ef2e85f95fd983c89c62d261a1 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 26 Sep 2023 15:08:56 +0000 Subject: [PATCH 1/3] Remove include_yamltests arg, and install always for python tests --- .github/workflows/tests.yaml | 2 +- scripts/build_python.sh | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7d4ae2bfbe2b46..2274cd3a30872f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -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} \ diff --git a/scripts/build_python.sh b/scripts/build_python.sh index e0fa8303f72403..8b5970ab65a214 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -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. " } @@ -129,9 +128,6 @@ while (($#)); do extra_packages=$2 shift ;; - --include_yamltests) - include_yamltests="yes" - ;; --pregen_dir | -z) pregen_dir=$2 shift @@ -187,14 +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") @@ -217,6 +205,12 @@ 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. + WHEEL+=( + "$(ls -tr "$(wheel_output_dir "$YAMLTESTS_GN_LABEL")"/*.whl | head -n 1)" + ) + echo_blue "Installing python test dependencies ..." "$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" From 26f231feae5d336c25b23bfab5106c7390b110f6 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 26 Sep 2023 18:11:12 +0000 Subject: [PATCH 2/3] CI fixes --- scripts/build_python.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build_python.sh b/scripts/build_python.sh index 8b5970ab65a214..8fd76ea83629f5 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -207,11 +207,12 @@ if [ -n "$install_virtual_env" ]; then 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. - WHEEL+=( + 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 From 365314d7dea04aa72b5df7b80008fb33dea58e92 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Tue, 26 Sep 2023 19:01:25 +0000 Subject: [PATCH 3/3] CI fixes --- scripts/build_python.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build_python.sh b/scripts/build_python.sh index 8fd76ea83629f5..6965cecad3dd6f 100755 --- a/scripts/build_python.sh +++ b/scripts/build_python.sh @@ -183,7 +183,6 @@ else WHEEL=("$OUTPUT_ROOT"/controller/python/chip*.whl) fi - if [ -n "$extra_packages" ]; then WHEEL+=("$extra_packages") fi