2 Commits

Author SHA1 Message Date
Casper Chang
db77879e23 Use ToT's local manifest for stable branch 2025-03-14 09:38:01 +08:00
Casper Chang
af22786b16 init stable branch 2025-03-14 07:44:54 +08:00
8 changed files with 32 additions and 182 deletions

View File

@@ -1,6 +1,6 @@
user_password=casper
working_dir=release-R136-16238
repo_branch=release-R136-16238.B
working_dir=stable_b
repo_branch=stable
chrome_board_name=nissa
chrome_project_name=joxer
chipset_name=adln

View File

@@ -25,12 +25,20 @@ then
echo "INFO: copy local manifests, No branch specified"
cp -R ${SCRIPT_DIR}/local_manifests ${_working_full_path}/.repo/
else
if [ $2 = "stable" ]; then
rm -fr ${_working_full_path}/.repo/local_manifests
echo "INFO: rm -fr ${_working_full_path}/.repo/local_manifests"
echo "INFO: copy local manifests, stable branch is specified, using ToT's manifests"
cp -R ${SCRIPT_DIR}/local_manifests ${_working_full_path}/.repo/
else
rm -fr ${_working_full_path}/.repo/local_manifests
echo "INFO: rm -fr ${_working_full_path}/.repo/local_manifests"
echo "INFO: copy $2 local manifests"
local_manifest_dir="$2_local_manifests"
cp -R ${SCRIPT_DIR}/${local_manifest_dir} ${_working_full_path}/.repo
mv ${_working_full_path}/.repo/${local_manifest_dir} ${_working_full_path}/.repo/local_manifests
fi
fi
echo "INFO: ls ${_working_full_path}/.repo"

View File

@@ -158,23 +158,23 @@ send "$user_password\r"
expect "(cr)"
if { $repo_branch eq "default" } {
puts "SEND branch is default, use local_manifests folder"
} else {
puts "INFO: board name = ${chrome_board_name}"
if { ${chrome_board_name} eq "nissa" } {
puts "INFO: chrome_chipset_name = adln"
set chrome_chipset_name "adln"
}
# if { $repo_branch eq "default" } {
# puts "SEND branch is default, use local_manifests folder"
# } else {
# puts "INFO: board name = ${chrome_board_name}"
# if { ${chrome_board_name} eq "nissa" } {
# puts "INFO: chrome_chipset_name = adln"
# set chrome_chipset_name "adln"
# }
puts "SEND: ../config/setup_project.sh --chipset ${chrome_chipset_name} --program=${chrome_board_name} --project=${chrome_project_name} --branch=${repo_branch}"
send "../config/setup_project.sh --chipset ${chrome_chipset_name} --program=${chrome_board_name} --project=${chrome_project_name} --branch=${repo_branch}\r"
# puts "SEND: ../config/setup_project.sh --chipset ${chrome_chipset_name} --program=${chrome_board_name} --project=${chrome_project_name} --branch=${repo_branch}"
# send "../config/setup_project.sh --chipset ${chrome_chipset_name} --program=${chrome_board_name} --project=${chrome_project_name} --branch=${repo_branch}\r"
expect "Local manifest setup complete"
puts "SNED: repo sync --force-sync -j48"
send "repo sync --force-sync -j48\r"
expect "successfully"
}
# expect "Local manifest setup complete"
# puts "SNED: repo sync --force-sync -j48"
# send "repo sync --force-sync -j48\r"
# expect "successfully"
# }
set setup_board_log_file_name "${chrome_board_name}_${chrome_project_name}_dailybuild_setup_board_${date}.log"
set build_package_log_file_name "${chrome_board_name}_${chrome_project_name}_dailybuild_build_package_${date}.log"

View File

@@ -1,18 +0,0 @@
#!/bin/bash
_board_name=$1
_mount_dir=$2
if [ -z "$_board_name" ]; then
echo "please enter board namd and mount dir"
exit 1
fi
if [ -z "$_mount_dir" ]; then
echo "start servod without share folder mounted"
echo "please enter mount dir, I usually using the dir /home/${USER}/chrome/ToT/src/scripts"
echo "start-servod --channel=release --mount=${_mount_dir}:/tmp/firmware_to_flash -n flashing_servod --board=${_board_name} -p 9999"
start-servod --channel=release --board=${_board_name} -p 9999
else
echo "start-servod --channel=release --mount=${_mount_dir}:/tmp/firmware_to_flash -n flashing_servod --board=${_board_name} -p 9999"
start-servod --channel=release --mount=${_mount_dir}:/tmp/firmware_to_flash -n flashing_servod --board=${_board_name} -p 9999
fi

View File

@@ -1,46 +0,0 @@
#!/bin/bash
# 設定測試設備的IP地址
TARGET_IP=$DUT_IP
# 建立 test_report 資料夾,如果不存在的話
mkdir -p test_report
# 從文字檔中讀取測試項目
# 假設你的文字檔名叫 test_list.txt請根據實際情況修改
while IFS= read -r test_item || [[ -n "$test_item" ]]; do
# 移除可能的空白字符
test_item=$(echo "$test_item" | xargs)
# 跳過空行
[ -z "$test_item" ] && continue
echo "正在執行測試: $test_item"
# 執行測試
tast run "$TARGET_IP" "$test_item"
# 找到最新的測試結果資料夾
# 使用 ls -t 排序並取第一個(最新的)
latest_result=$(ls -td /tmp/tast/results/* | head -n 1)
if [ -d "$latest_result" ]; then
# 取得資料夾名稱
folder_name=$(basename "$latest_result")
# 新的資料夾名稱加上測試項目名稱
new_name="${folder_name}_${test_item}"
# 複製到 test_report 資料夾並重新命名
cp -r "$latest_result" "test_report/$new_name"
echo "測試結果已儲存至: test_report/$new_name"
else
echo "警告: 找不到測試結果資料夾 for $test_item"
fi
echo "----------------------------------------"
done < test_list.txt
echo "所有測試已完成!"

View File

@@ -1,47 +0,0 @@
tast.firmware.SoftwareSync.dev
tast.firmware.DeepSleep
tast.firmware.BootMode.rec_to_dev
tast.firmware.BootMode.rec_to_dev_gbb
tast.firmware.CorruptBothFWSigABAndEC.normal
tast.firmware.CorruptBothFWSigABAndEC.dev
tast.firmware.ECADC
tast.firmware.ECBattery
tast.firmware.ECCbi
tast.firmware.ECChargingState.discharge
tast.firmware.ECChargingState.full_charge
tast.firmware.ECKeyboard.usb_keyboard
tast.firmware.ECKeyboard.convertible
tast.firmware.ECLaptopMode
tast.firmware.ECLidShutdown
tast.firmware.ECLidSwitch.check_key_press
tast.firmware.ECLidSwitch.open_lid_to_boot
tast.firmware.ECLidSwitch.close_lid_to_shutd
tast.firmware.ECLidSwitch.open_lid_to_unsusp
tast.firmware.ECPowerButton
tast.firmware.ECPowerG3.shutdown
tast.firmware.ECPowerG3.power_button
tast.firmware.ECPowerG3.power_state
tast.firmware.ECPowerG3.power_state_usb_plug
tast.firmware.ECPowerG3.power_state_snk
tast.firmware.ECPowerG3.power_state_rec_off
tast.firmware.ECPowerG3.power_button_from_ro
tast.firmware.ECReboot
tast.firmware.ECSharedMemory
tast.firmware.ECSize
tast.firmware.ECTabletMode
tast.firmware.ECUSBPorts.usb_pins_on_lid_clo
tast.firmware.ECUSBPorts.usb_pins_on_shutdow
tast.firmware.ECVerifyVK
tast.firmware.ECWakeSource.power_btn
tast.firmware.ECWakeSource.keypress
tast.firmware.ECWakeSource.lid
tast.firmware.ECWakeSource.usb_keyboard
tast.firmware.ECWatchdog
tast.firmware.Eventlog.suspend_resume
tast.firmware.Fmap.ec
tast.firmware.FWCorruptRecoveryCache.normal
tast.firmware.ScreenWakeTabletMode
tast.firmware.SoftwareSync.normal
tast.firmware.USBResumeFromSuspend
tast.firmware.WriteProtect.ec
tast.power.SuspendPerf.fw_qual

View File

@@ -1,2 +1 @@
# test_that -b $1 $2 f:.*firmware_ConsecutiveBoot/control.2500 --autotest_dir ../third_party/autotest/files/
tast run --var=servo=localhost:9999 --var=firmware.consecutiveBootIters=1500 $1 firmware.ConsecutiveBoot.shutdown_cmd_normal_mode
test_that -b $1 $2 f:.*firmware_ConsecutiveBoot/control.2500 --autotest_dir ../third_party/autotest/files/

View File

@@ -1,46 +0,0 @@
#!/bin/bash
# 設定測試設備的IP地址
TARGET_IP="192.168.50.11"
# 建立 test_report 資料夾,如果不存在的話
mkdir -p test_report
# 從文字檔中讀取測試項目
# 假設你的文字檔名叫 test_list.txt請根據實際情況修改
while IFS= read -r test_item || [[ -n "$test_item" ]]; do
# 移除可能的空白字符
test_item=$(echo "$test_item" | xargs)
# 跳過空行
[ -z "$test_item" ] && continue
echo "正在執行測試: $test_item"
# 執行測試
tast run "$TARGET_IP" "$test_item"
# 找到最新的測試結果資料夾
# 使用 ls -t 排序並取第一個(最新的)
latest_result=$(ls -td /tmp/tast/results/* | head -n 1)
if [ -d "$latest_result" ]; then
# 取得資料夾名稱
folder_name=$(basename "$latest_result")
# 新的資料夾名稱加上測試項目名稱
new_name="${folder_name}_${test_item}"
# 複製到 test_report 資料夾並重新命名
cp -r "$latest_result" "test_report/$new_name"
echo "測試結果已儲存至: test_report/$new_name"
else
echo "警告: 找不到測試結果資料夾 for $test_item"
fi
echo "----------------------------------------"
done < test_list.txt
echo "所有測試已完成!"