Skip to content
Draft
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 backend
Submodule backend updated 63 files
+1 −0 .gitignore
+1 −1 .version_information
+0 −29 alembic/versions/0a251edfd975_adding_count_on_metadata_to_support_.py
+0 −1 alembic/versions/96ee37627a48_adding_the_new_column_collection_id.py
+0 −1 alembic/versions/9df8004ad9bb_migrate_python_test_legacy_suite_.py
+0 −1 alembic/versions/e2c185af1226_pics_v2_support.py
+75 −113 app/api/api_v1/endpoints/test_run_executions.py
+42 −3 app/api/api_v1/sockets/web_sockets.py
+22 −0 app/constants/websockets_constants.py
+8 −4 app/container_manager/container_manager.py
+0 −2 app/models/test_case_metadata.py
+191 −35 app/socket_connection_manager.py
+47 −0 app/test_engine/models/manual_test_case.py
+0 −1 app/test_engine/models/test_case.py
+1 −1 app/test_engine/test_collection_discovery.py
+0 −1 app/test_engine/test_ui_observer.py
+514 −4 app/tests/api/api_v1/test_test_run_executions.py
+18 −10 app/tests/socket_connection_manager/test_socket_connection_manager.py
+0 −1 app/tests/test_engine/test_ui_observer.py
+3 −3 app/tests/user_prompts/test_options_select_user_prompts.py
+3 −3 app/tests/user_prompts/test_text_input_user_prompts.py
+74 −54 app/tests/version/test_read_test_harness_backend_version.py
+4 −0 app/user_prompt_support/__init__.py
+26 −0 app/user_prompt_support/prompt_request.py
+6 −16 app/utils.py
+6 −1 cspell.json
+0 −63 scripts/log_display/install_log_display.sh
+0 −85 scripts/log_display/start_log_display.sh
+0 −27 scripts/log_display/stop_log_display.sh
+0 −68 scripts/log_display/uninstall_log_display.sh
+0 −1 test_collections/matter/__init__.py
+2 −2 test_collections/matter/config.py
+39 −1 test_collections/matter/scripts/update-sample-apps.sh
+5 −0 test_collections/matter/sdk_tests/python_tests_ignore.txt
+2 −0 test_collections/matter/sdk_tests/python_tests_include.txt
+35 −11 test_collections/matter/sdk_tests/scripts/fetch_sdk_tests_and_runner.sh
+3 −3 test_collections/matter/sdk_tests/support/constants.py
+0 −24 test_collections/matter/sdk_tests/support/performance_tests/__init__.py
+0 −37 test_collections/matter/sdk_tests/support/performance_tests/models/performance_tests_models.py
+0 −237 test_collections/matter/sdk_tests/support/performance_tests/models/performance_tests_parser.py
+2 −3 test_collections/matter/sdk_tests/support/performance_tests/models/test_case.py
+0 −69 test_collections/matter/sdk_tests/support/performance_tests/models/test_declarations.py
+0 −93 test_collections/matter/sdk_tests/support/performance_tests/models/test_suite.py
+15 −18 test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/TC_COMMISSIONING_1_0.py
+0 −50 test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/accessory_manager.py
+0 −63 test_collections/matter/sdk_tests/support/performance_tests/scripts/sdk/simulated_accessory.py
+5 −0 test_collections/matter/sdk_tests/support/python_testing/__init__.py
+350 −58 test_collections/matter/sdk_tests/support/python_testing/list_python_tests_classes.py
+53 −55 test_collections/matter/sdk_tests/support/python_testing/models/python_test_parser.py
+39 −0 test_collections/matter/sdk_tests/support/python_testing/models/python_testing_hooks_proxy.py
+177 −26 test_collections/matter/sdk_tests/support/python_testing/models/rpc_client/test_harness_client.py
+74 −1 test_collections/matter/sdk_tests/support/python_testing/models/test_case.py
+3 −3 test_collections/matter/sdk_tests/support/python_testing/models/test_suite.py
+9 −10 test_collections/matter/sdk_tests/support/python_testing/models/utils.py
+1 −0 test_collections/matter/sdk_tests/support/python_testing/sdk_python_tests.py
+0 −14 test_collections/matter/sdk_tests/support/sdk_container.py
+493 −0 test_collections/matter/sdk_tests/support/tests/python_tests/test_list_python_tests_classes.py
+0 −2 test_collections/matter/sdk_tests/support/tests/test_sdk_container.py
+3 −3 test_collections/matter/sdk_tests/support/yaml_tests/matter_yaml_runner.py
+54 −10 test_collections/matter/sdk_tests/support/yaml_tests/models/chip_test.py
+4 −2 test_collections/matter/sdk_tests/support/yaml_tests/models/test_case.py
+4 −2 test_collections/matter/sdk_tests/support/yaml_tests/models/yaml_test_parser.py
+0 −1 test_collections/matter/test_environment_config.py
10 changes: 10 additions & 0 deletions scripts/pi-setup/install-pi-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ source "$SCRIPT_DIR/utils.sh"

print_start_of_script

if ! is_running_on_raspberry_pi; then
if is_running_in_wsl; then
print_script_step "Skipping Raspberry Pi dependencies (running in WSL)"
else
print_script_step "Skipping Raspberry Pi dependencies (not running on Raspberry Pi)"
fi
print_end_of_script
exit 0
fi

print_script_step "Silence user prompts about reboot and service restart required (script will prompt user to reboot in the end)"
sudo sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf
sudo sed -i "s/#\$nrconf{restart} = 'i';/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf
Expand Down
53 changes: 33 additions & 20 deletions scripts/ubuntu/2-machine-cofiguration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ sudo groupadd docker
sudo usermod -a -G docker $USER
sudo service docker restart

# Setup Wifi
print_script_step "Create System Service for wpa_suppliant"
printf "\n Writing: /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service"
cat << EOF | sudo tee /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service
# Setup Wifi (Raspberry Pi only)
if is_running_on_raspberry_pi; then
print_script_step "Create System Service for wpa_suppliant"
printf "\n Writing: /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service"
cat << EOF | sudo tee /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service
[Unit]
Description=WPA supplicant
Before=network.target
Expand All @@ -53,30 +54,42 @@ ExecStart=/sbin/wpa_supplicant -u -s -i $WLAN_INTERFACE -c /etc/wpa_supplicant/w
WantedBy=multi-user.target
Alias=dbus-fi.w1.wpa_supplicant1.service
EOF
sudo systemctl daemon-reload
sudo systemctl enable dbus-fi.w1.wpa_supplicant1

WPA_SUPPLICANT_FILE=/etc/wpa_supplicant/wpa_supplicant.conf
WPA_SUPPLICANT_SETTINGS=(
"ctrl_interface=DIR=/run/wpa_supplicant"
"update_config=1"
)
printf "\n Updating: $WPA_SUPPLICANT_FILE\n"
sudo touch "$WPA_SUPPLICANT_FILE"
for setting in ${WPA_SUPPLICANT_SETTINGS[@]}; do
echo " setting: $setting"
grep -qxF "$setting" "$WPA_SUPPLICANT_FILE" || echo "$setting" | sudo tee -a "$WPA_SUPPLICANT_FILE"
done
sudo systemctl daemon-reload
sudo systemctl enable dbus-fi.w1.wpa_supplicant1

WPA_SUPPLICANT_FILE=/etc/wpa_supplicant/wpa_supplicant.conf
WPA_SUPPLICANT_SETTINGS=(
"ctrl_interface=DIR=/run/wpa_supplicant"
"update_config=1"
)
printf "\n Updating: $WPA_SUPPLICANT_FILE\n"
sudo touch "$WPA_SUPPLICANT_FILE"
for setting in ${WPA_SUPPLICANT_SETTINGS[@]}; do
echo " setting: $setting"
grep -qxF "$setting" "$WPA_SUPPLICANT_FILE" || echo "$setting" | sudo tee -a "$WPA_SUPPLICANT_FILE"
done
elif is_running_in_wsl; then
print_script_step "Skipping WiFi configuration (running in WSL)"
else
print_script_step "Skipping WiFi configuration (not running on Raspberry Pi)"
fi

# Setup Network
print_script_step "Accept Router Advertisements on network interfaces"
SYSCTL_FILE=/etc/sysctl.conf
SYSCTL_SETTINGS=(
"net.ipv6.conf.eth0.accept_ra=2"
"net.ipv6.conf.eth0.accept_ra_rt_info_max_plen=64"
"net.ipv6.conf.$WLAN_INTERFACE.accept_ra=2"
"net.ipv6.conf.$WLAN_INTERFACE.accept_ra_rt_info_max_plen=64"
)

# WLAN sysctl settings are only relevant on Raspberry Pi
if is_running_on_raspberry_pi; then
SYSCTL_SETTINGS+=(
"net.ipv6.conf.$WLAN_INTERFACE.accept_ra=2"
"net.ipv6.conf.$WLAN_INTERFACE.accept_ra_rt_info_max_plen=64"
)
fi

printf "\n Updating: $SYSCTL_FILE\n"
sudo touch "$SYSCTL_FILE"
for setting in ${SYSCTL_SETTINGS[@]}; do
Expand Down
54 changes: 46 additions & 8 deletions scripts/ubuntu/internal-auto-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,49 @@ print_end_of_script

print_installation_success

print_script_step "You need to reboot to finish setup"
printf "Do you want to reboot now? (Press 1 to reboot now)\n"
select yn in "Yes" "No"; do
case $yn in
Yes ) sudo reboot; break;;
No ) exit;;
esac
done
if is_running_in_wsl; then
print_script_step "Applying configuration changes (WSL - no reboot needed)"

echo "Applying sysctl settings..."
sudo sysctl -p

echo "Loading ip6table_filter kernel module..."
sudo modprobe ip6table_filter 2>/dev/null || echo " (module not available in WSL kernel - this is OK)"

echo "Refreshing docker group membership..."
newgrp docker << END
echo " Docker group active"
END

SDK_DOCKER_TAG=$(cat $ROOT_DIR/backend/test_collections/matter/config.py | grep SDK_DOCKER_TAG | cut -d'"' -f 2 | cut -d"'" -f 2)

echo ""
echo "********************************************************************************"
echo "Setup complete."
echo ""
echo "REMINDER: Sample apps were not installed for your architecture."
echo "You can build them manually from the Matter SDK source"
echo "(commit: $SDK_DOCKER_TAG) and copy the resulting binaries to ~/apps/"
echo ""
echo " cd ~/connectedhomeip"
echo " git checkout $SDK_DOCKER_TAG"
echo " git submodule update --init --recursive"
echo " . scripts/bootstrap.sh"
echo " . scripts/activate.sh"
echo " ./scripts/build/build_examples.py --target linux-x64-all-clusters build"
echo " cp out/linux-x64-all-clusters/chip-all-clusters-app ~/apps/"
echo ""
echo "To start the Test Harness, run:"
echo " cd $ROOT_DIR && ./scripts/start.sh"
echo "********************************************************************************"
echo ""
else
print_script_step "You need to reboot to finish setup"
printf "Do you want to reboot now? (Press 1 to reboot now)\n"
select yn in "Yes" "No"; do
case $yn in
Yes ) sudo reboot; break;;
No ) exit;;
esac
done
fi
11 changes: 11 additions & 0 deletions scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,14 @@ check_installation_prerequisites()
exit 1
fi
}

is_running_on_raspberry_pi()
{
[ -f /sys/firmware/devicetree/base/model ] && \
grep -qi "raspberry pi" /sys/firmware/devicetree/base/model 2>/dev/null
}

is_running_in_wsl()
{
grep -qi microsoft /proc/version 2>/dev/null
}