11*** Settings ***
22Library Collections
3- Library Dialogs
43Library DateTime
4+ Library Dialogs
55Library OperatingSystem
66Library Process
77Library String
@@ -25,7 +25,7 @@ PFS001.502 Install pfSense LTS CE (serial output) on disk
2525 ... USB stick on disk. Refer to test case PFS006.502 for preseed.
2626 Power On
2727 Boot PfSense Installer
28- ${installer_message } = Catenate Click OK, after test execution ends,
28+ ${installer_message } = Catenate Click OK, after test execution ends,
2929 ... connect to DUT via serial and continue manual installation.
3030 Pause Execution ${installer_message }
3131
@@ -36,17 +36,27 @@ PFS002.502 Boot pfSense LTS CE (serial output) from disk
3636
3737PFS003.502 Boot pfSense LTS CE (serial output) from disk after cold-boot
3838 [Documentation] Boot pfSense LTS CE (serial output) from disk after cold-boot
39+ @{supported_power_ctrls } = Create List RteCtrl sonoff
40+ Skip If '${POWER_CTRL } ' not in ${supported_power_ctrls }
3941 Power On
4042 Set UEFI Option PowerStateAfterPowerAcLoss Powered On
41- Sleep 1
42- Rte Psu Off
43- Sleep 5
44- Rte Psu On
43+ Sleep 2
44+ IF '${POWER_CTRL } ' == 'RteCtrl'
45+ Rte Psu Off
46+ ELSE IF '${POWER_CTRL } ' == 'sonoff'
47+ Sonoff Off
48+ END
49+ Sleep 12
50+ IF '${POWER_CTRL } ' == 'RteCtrl'
51+ Rte Psu On
52+ ELSE IF '${POWER_CTRL } ' == 'sonoff'
53+ Sonoff On
54+ END
4555 ${start_date } = Get Current Date
4656 Boot PfSense
4757 ${end_date } = Get Current Date
4858 ${delta_time } = Subtract Date From Date ${end_date } ${start_date }
49- Log To Console Cold boot duration in seconds: ${delta_time } }
59+ Log To Console Cold boot duration in seconds: ${delta_time }
5060
5161PFS004.502 Boot pfSense LTS CE (serial output) from disk after warm-boot
5262 [Documentation] Boot pfSense LTS CE (serial output) from disk after warm-boot
@@ -59,7 +69,7 @@ PFS004.502 Boot pfSense LTS CE (serial output) from disk after warm-boot
5969 Boot PfSense
6070 ${end_date } = Get Current Date
6171 ${delta_time } = Subtract Date From Date ${end_date } ${start_date }
62- Log To Console Warm boot duration in seconds: ${delta_time } }
72+ Log To Console Warm boot duration in seconds: ${delta_time }
6373
6474PFS005.502 Boot pfSense LTS CE (serial output) from disk after reboot
6575 [Documentation] Boot pfSense LTS CE (serial output) from disk after reboot
@@ -71,19 +81,25 @@ PFS005.502 Boot pfSense LTS CE (serial output) from disk after reboot
7181 Boot PfSense
7282 ${end_date } = Get Current Date
7383 ${delta_time } = Subtract Date From Date ${end_date } ${start_date }
74- Log To Console Reboot duration in seconds: ${delta_time } }
75-
84+ Log To Console Reboot duration in seconds: ${delta_time }
7685
7786PFS006.502 Preseed pfSense Installer
7887 [Documentation] Please use linux fatlabel program to rename ESP partition of
7988 ... pfSense installer to PFEFI.
80- Execute Manual Step Rename ESP partition of pfSense installer to PFEFI.
89+ ${pfefi_message } = Catenate SEPARATOR=${SPACE } Rename ESP partition of pfSense
90+ ... serial installer to PFEFI.\nOn Linux: (sudo) fatlabel /dev/sdX1 PFEFI
91+ Execute Manual Step ${pfefi_message }
92+ Execute Manual Step Connect pfSense serial installer USB stick to DUT.
8193
8294 Power On
8395 Boot PfSense Installer
8496 Enter PfSense Rescue Shell
97+ ${awk_args } = Catenate SEPARATOR=${SPACE } -v sq="'" -v dq='"'
98+ ... -v ROOT_LABEL=PFBOOT '/^NEWFS_ESP=/ { print "NEWFS_ESP="
99+ ... sq "newfs_msdos -L " ROOT_LABEL " " dq "%s" dq sq; next; };
100+ ... { print; }'
85101 Execute Command In Terminal
86- ... awk -v sq="'" -v dq='"' -v ROOT_LABEL=PFBOOT '/^NEWFS_ESP=/ { print "NEWFS_ESP=" sq "newfs_msdos -L " ROOT_LABEL " " dq "%s" dq sq; next; }; { print; }' /usr/libexec/bsdinstall/zfsboot > /tmp/zfsboot
102+ ... awk ${ awk_args } /usr/libexec/bsdinstall/zfsboot > /tmp/zfsboot
87103 Execute Command In Terminal mount -u /
88104 Execute Command In Terminal mv /tmp/zfsboot /usr/libexec/bsdinstall/zfsboot
89105 Execute Command In Terminal chmod +x /usr/libexec/bsdinstall/zfsboot
@@ -98,5 +114,3 @@ PFS007.502 Boot pfSense LTS CE (serial output) Installer into rescue shell
98114 ${output } = Execute Command In Terminal ls
99115 Should Contain ${output } COPYRIGHT
100116 Should Contain ${output } .profile
101-
102-
0 commit comments