7 Commits

Author SHA1 Message Date
Casper Chang
09212011bf init release-R136-16238.B 2025-05-13 08:40:07 +00:00
Your Name
29c5beeb7b modify reboot endurance script 2025-05-07 08:15:13 +00:00
Your Name
8ba3039e36 add mount dir 2025-04-28 02:39:22 +00:00
Your Name
d4025f5e40 add start servod container script 2025-04-28 02:31:30 +00:00
Casper Chang
e02444c022 add test failure item script
add test_failure_item.sh for faft test rerun.
1. create test_list.txt file that listed the tast tests
  e.g.
    firmware.BootMode.rec_to_dev_gbb
    firmware.BootMode.normal_dev
    firmware.BrokenToDev
    firmware.CorruptBothKernelCopies
2. the test result will be cp to the folder test_report along with the script
2025-04-09 14:43:01 +08:00
Casper Chang
2283bd185e modify default config file 2025-03-13 17:23:01 +08:00
Casper Chang
03384e5850 modify main branch config 2025-03-11 20:09:53 +13:00
10 changed files with 175 additions and 115 deletions

View File

@@ -1,13 +1,13 @@
user_password=casper
working_dir=fw_nissa_768
repo_branch=firmware-nissa-15217.768.B
working_dir=release-R136-16238
repo_branch=release-R136-16238.B
chrome_board_name=nissa
chrome_project_name=joxer
chipset_name=adln
is_repo_sync=true
is_setup_board=true
is_build_packages=false
is_build_firmware=true
is_build_firmware=false
is_build_image=false
is_install_image=false
dut_ip_addr=192.168.1.2

View File

@@ -1,73 +0,0 @@
<manifest>
<remote name="cros-internal"
fetch="https://chrome-internal.googlesource.com"
review="https://chrome-internal-review.googlesource.com" />
<project name="chromeos/overlays/project-cheets-private"
path="src/private-overlays/project-cheets-private"
remote="cros-internal"
groups="minilayout" revision="refs/heads/firmware-nissa-15217.B" />
<project name="chromeos/autotest-cheets"
path="src/third_party/autotest-tests-cheets"
remote="cros-internal"
groups="minilayout" revision="refs/heads/firmware-nissa-15217.B" />
<project name="chromeos/overlays/chromeos-partner-overlay"
path="src/private-overlays/chromeos-partner-overlay"
remote="cros-internal"
groups="minilayout" revision="refs/heads/firmware-nissa-15217.B" />
<project remote="cros-internal"
path="src/private-overlays/chipset-adln-private"
groups="minilayout"
name="chromeos/overlays/chipset-adln-private" revision="refs/heads/firmware-nissa-15217.B" />
<project path="src/third_party/fsp/adln/edk2-platforms/branch1-private"
remote="cros-internal"
name="chromeos/third_party/intel-fsp/edk2-platforms"
revision="refs/heads/firmware-nissa-15217.B-chromeos-adl-n-branch1-private"
groups="minilayout" />
<project path="src/third_party/fsp/adln/edk2/branch1-private"
remote="cros-internal"
name="chromeos/third_party/intel-fsp/edk2"
revision="refs/heads/firmware-nissa-15217.B-chromeos-adl-n-branch1-private"
groups="minilayout" />
<project path="src/third_party/fsp/adln/fsp"
remote="cros-internal"
name="chromeos/third_party/intel-fsp/adl-n"
revision="refs/heads/firmware-nissa-15217.B"
groups="minilayout" />
<project path="src/third_party/fsp/twl/edk2-platforms/branch1-private"
remote="cros-internal"
name="chromeos/third_party/intel-fsp/edk2-platforms-intelcollab"
revision="refs/heads/firmware-nissa-15217.B-chromeos-twl-branch1-private"
groups="minilayout" />
<project path="src/third_party/fsp/twl/edk2/branch1-private"
remote="cros-internal"
name="chromeos/third_party/intel-fsp/edk2-intelcollab"
revision="refs/heads/firmware-nissa-15217.B-chromeos-twl-branch1-private"
groups="minilayout" />
<project path="src/third_party/fsp/twl/fsp"
remote="cros-internal"
name="chromeos/third_party/intel-fsp/twl"
revision="refs/heads/firmware-nissa-15217.B"
groups="minilayout" />
<!-- Example program galaxy, its projects, and overlay -->
<project remote="cros-internal"
path="src/program/galaxy"
name="chromeos/program/galaxy"
groups="partner-config" revision="refs/heads/firmware-nissa-15217.B" />
<project remote="cros-internal"
path="src/project/galaxy/andromeda"
name="chromeos/project/galaxy/andromeda"
groups="partner-config" revision="refs/heads/firmware-nissa-15217.B" />
<project remote="cros-internal"
path="src/project/galaxy/milkyway"
name="chromeos/project/galaxy/milkyway"
groups="partner-config" revision="refs/heads/firmware-nissa-15217.B" />
<project remote="cros-internal"
path="src/project/galaxy/sombrero"
name="chromeos/project/galaxy/sombrero"
groups="partner-config" revision="refs/heads/firmware-nissa-15217.B" />
<project name="chromeos/overlays/overlay-galaxy-private"
path="src/private-overlays/overlay-galaxy-private"
remote="cros-internal"
groups="minilayout" revision="refs/heads/firmware-nissa-15217.B" />
</manifest>

View File

@@ -1,10 +0,0 @@
<manifest>
<remote name="cros-internal"
fetch="https://chrome-internal.googlesource.com"
review="https://chrome-internal-review.googlesource.com" />
<!-- project repo-->
<project remote="cros-internal"
path="src/project/nissa/joxer"
name="chromeos/project/nissa/joxer"
groups="partner-config" revision="refs/heads/firmware-nissa-15217.B" />
</manifest>

View File

@@ -1,14 +0,0 @@
<manifest>
<remote name="cros-internal"
fetch="https://chrome-internal.googlesource.com"
review="https://chrome-internal-review.googlesource.com" />
<!-- Nissa Specific Repositories -->
<project remote="cros-internal"
path="src/private-overlays/overlay-nissa-private"
groups="minilayout,firmware"
name="chromeos/overlays/overlay-nissa-private" revision="refs/heads/firmware-nissa-15217.B" />
<project remote="cros-internal"
path="src/program/nissa"
name="chromeos/program/nissa"
groups="partner-config" revision="refs/heads/firmware-nissa-15217.B" />
</manifest>

View File

@@ -135,20 +135,19 @@ spawn ./cros_repoinit.sh ${working_dir} ${repo_branch}
# send "y\r"
expect "repo has been initialized"
# # remove using the local manifest files when doing this on branch
# # todo: search to check if branch supported
# spawn ./cros_cp_localmanifest.sh ${working_dir} ${repo_branch}
# expect "local_manifests"
# todo: search to check if branch supported
spawn ./cros_cp_localmanifest.sh ${working_dir} ${repo_branch}
expect "local_manifests"
# if { $is_repo_sync } {
# send "repo forall -c \"git reset --hard\"\r"
if { $is_repo_sync } {
send "repo forall -c \"git reset --hard\"\r"
# spawn ./cros_reposync.sh ${working_dir} ${reposync_thread}
# expect "repo sync has finished successfully"
# } else {
# send "ls -al\r"
# expect ".repo"
# }
spawn ./cros_reposync.sh ${working_dir} ${reposync_thread}
expect "repo sync has finished successfully"
} else {
send "ls -al\r"
expect ".repo"
}
spawn ./cros_cp_utilities.sh ${working_dir}
expect "dut_pty.sh"
@@ -259,7 +258,7 @@ expect "(cr)"
if { $is_build_image } {
if { $is_kernel_tty_enable } {
send "cros build-images --board=${chrome_board_name} test | tee ${build_image_log_file_name}\r"
send "./build_image --board=${chrome_board_name} --noenable_rootfs_verification test | tee ${build_image_log_file_name}\r"
} else {
send "./build_image --enable_serial='ttyS0,115200n8' --board=${chrome_board_name} --noenable_rootfs_verification test | tee ${build_image_log_file_name}\r"

18
start_servod_container.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/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

46
test_failure_item.sh Normal file
View File

@@ -0,0 +1,46 @@
#!/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 "所有測試已完成!"

47
test_list.txt Normal file
View File

@@ -0,0 +1,47 @@
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 +1,2 @@
test_that -b $1 $2 f:.*firmware_ConsecutiveBoot/control.2500 --autotest_dir ../third_party/autotest/files/
# 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

View File

@@ -0,0 +1,46 @@
#!/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 "所有測試已完成!"