1
1
*** Settings ***
2
2
Library Collections
3
- Library Dialogs
4
3
Library DateTime
4
+ Library Dialogs
5
5
Library OperatingSystem
6
6
Library Process
7
7
Library String
@@ -25,7 +25,7 @@ PFS001.502 Install pfSense LTS CE (serial output) on disk
25
25
... USB stick on disk. Refer to test case PFS006.502 for preseed.
26
26
Power On
27
27
Boot PfSense Installer
28
- ${installer_message } = Catenate Click OK, after test execution ends,
28
+ ${installer_message } = Catenate Click OK, after test execution ends,
29
29
... connect to DUT via serial and continue manual installation.
30
30
Pause Execution ${installer_message }
31
31
@@ -36,17 +36,27 @@ PFS002.502 Boot pfSense LTS CE (serial output) from disk
36
36
37
37
PFS003.502 Boot pfSense LTS CE (serial output) from disk after cold-boot
38
38
[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 }
39
41
Power On
40
42
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
45
55
${start_date } = Get Current Date
46
56
Boot PfSense
47
57
${end_date } = Get Current Date
48
58
${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 }
50
60
51
61
PFS004.502 Boot pfSense LTS CE (serial output) from disk after warm-boot
52
62
[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
59
69
Boot PfSense
60
70
${end_date } = Get Current Date
61
71
${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 }
63
73
64
74
PFS005.502 Boot pfSense LTS CE (serial output) from disk after reboot
65
75
[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
71
81
Boot PfSense
72
82
${end_date } = Get Current Date
73
83
${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 }
76
85
77
86
PFS006.502 Preseed pfSense Installer
78
87
[Documentation] Please use linux fatlabel program to rename ESP partition of
79
88
... 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.
81
93
82
94
Power On
83
95
Boot PfSense Installer
84
96
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; }'
85
101
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
87
103
Execute Command In Terminal mount -u /
88
104
Execute Command In Terminal mv /tmp/zfsboot /usr/libexec/bsdinstall/zfsboot
89
105
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
98
114
${output } = Execute Command In Terminal ls
99
115
Should Contain ${output } COPYRIGHT
100
116
Should Contain ${output } .profile
101
-
102
-
0 commit comments