@@ -21,32 +21,35 @@ Test Setup Run Keyword
2121Default Tags semiauto
2222
2323
24- *** Variables ***
25- ${OPENWRT_IMAGE_LINK } = https://cloud.3mdeb.com/public.php/dav/files/nfC3WGaqCCzHmck
26- ${OPENWRT_IMAGE_FILE } = openwrt_combined_efi.img
27- ${OPENWRT_TARGET_DEVICE } = nvme0n1
28- ${OPENWRT_ETHERNET_CONTROLLER } = Intel Corporation Ethernet Controller
29-
30-
3124*** Test Cases ***
3225OWR001.206 Install operating system on disk (OpenWrt)
3326 [Documentation] This test installs OpenWrt on NVMe drive using dd program.
3427 ... DTS is boot via iPXE and OpenWrt image is downloaded using wget.
3528 ... OPENWRT_IMAGE_LINK - image link to download via wget
3629 ... OPENWRT_IMAGE_FILE - core of file name
3730 ... OPENWRT_TARGET_DEVICE - target drive to be wiped out using dd (!)
31+ [Tags] semiauto
32+ Skip If not ${TESTS_IN_OPENWRT_SUPPORT } OWR001.206 not supported
33+ Variable Should Exist ${OPENWRT_TARGET_DEVICE }
34+ Variable Should Exist ${OPENWRT_IMAGE_LINK }
35+ Variable Should Exist ${OPENWRT_IMAGE_FILE }
36+ ${selection } = Get Selection From User
37+ ... Caution! You are about to install OpenWrt on ${OPENWRT_TARGET_DEVICE } device. Are you sure?
38+ ... Yes, I'd like to wipe all the data existing on ${OPENWRT_TARGET_DEVICE } device.
39+ ... No, let's skip OpenWrt installation.
40+ ${contains_yes } = Run Keyword And Return Status Should Contain ${selection } Yes, I'd like to
41+ Skip If not(${contains_yes } ) OpenWrt installation on ${OPENWRT_TARGET_DEVICE } device skipped.
3842 Power On
3943 Make Sure That Network Boot Is Enabled
4044 Boot Dasharo Tools Suite iPXE
4145 Enter Shell In DTS
4246 VAR ${openwrt_image_gz } = ${OPENWRT_IMAGE_FILE } .gz separator=${EMPTY }
4347 Remove File ${openwrt_image_gz }
4448 Remove File ${OPENWRT_IMAGE_FILE }
45- Download File ${OPENWRT_IMAGE_LINK } ${openwrt_image_gz }
46- Execute Linux Command gunzip ${openwrt_image_gz }
47- Execute Linux Command dd if=${OPENWRT_IMAGE_FILE } of=/dev
49+ Download File OpenWrt ${OPENWRT_IMAGE_LINK } ${openwrt_image_gz }
50+ Execute Linux Command gunzip ${openwrt_image_gz } | dd of=/dev/${OPENWRT_TARGET_DEVICE } bs=1M
4851 Execute Linux Command sync
49- Power On
52+ Execute Reboot Command
5053 Boot OpenWrt
5154 # Disabling DHCP server of OpenWrt
5255 Execute Command In Terminal /etc/init.d/odhcpd disable
@@ -58,13 +61,15 @@ OWR001.206 Install operating system on disk (OpenWrt)
5861
5962OWR002.206 Boot operating system from disk (OpenWrt)
6063 [Documentation] Boot installed OpenWrt from NVMe drive, check identity.
64+ Skip If not ${TESTS_IN_OPENWRT_SUPPORT } OWR002.206 not supported
6165 Power On
6266 Boot OpenWrt
6367 ${out } = Execute Command In Terminal uname -a
6468 Should Contain ${out } OpenWrt
6569
6670OWR003.206 Boot operating system from disk after cold-boot (OpenWrt)
6771 [Documentation] Boot OpenWrt from hard disk after cold-boot.
72+ Skip If not ${TESTS_IN_OPENWRT_SUPPORT } OWR003.206 not supported
6873 VAR @{supported_power_ctrls } = RteCtrl sonoff
6974 Skip If '${POWER_CTRL } ' not in ${supported_power_ctrls }
7075 Power On
@@ -78,10 +83,12 @@ OWR003.206 Boot operating system from disk after cold-boot (OpenWrt)
7883
7984OWR004.206 Boot operating system from disk after warm-boot (OpenWrt)
8085 [Documentation] Boot OpenWrt from hard disk after warm-boot.
86+ Skip If not ${TESTS_IN_OPENWRT_SUPPORT } OWR004.206 not supported
8187 Power On
8288 Boot OpenWrt
83- Execute Command In Terminal poweroff
84- Power On
89+ Download File OpenWrt https://cloud.3mdeb.com/public.php/dav/files/Aqe5Xj24pkoYLwX /bin/rtcwake
90+ Execute Command In Terminal chmod +x /bin/rtcwake
91+ Perform Warmboot Using Rtcwake
8592 ${start_date } = Get Current Date
8693 Boot OpenWrt
8794 ${end_date } = Get Current Date
@@ -90,6 +97,7 @@ OWR004.206 Boot operating system from disk after warm-boot (OpenWrt)
9097
9198OWR005.206 Boot operating system from disk after reboot (OpenWrt)
9299 [Documentation] Boot OpenWrt from hard disk after reboot.
100+ Skip If not ${TESTS_IN_OPENWRT_SUPPORT } OWR005.206 not supported
93101 Power On
94102 Boot OpenWrt
95103 Execute Command In Terminal reboot
@@ -101,6 +109,7 @@ OWR005.206 Boot operating system from disk after reboot (OpenWrt)
101109
102110OWR006.206 Scan WiFi networks (OpenWrt)
103111 [Documentation] Enable WiFi and scan for 3mdeb lab network.
112+ Skip If not ${TESTS_IN_OPENWRT_SUPPORT } OWR006.206 not supported
104113 Power On
105114 Boot OpenWrt
106115 Enable WiFi OpenWrt
@@ -109,6 +118,8 @@ OWR006.206 Scan WiFi networks (OpenWrt)
109118OWR007.206 Ethernet controller detection (OpenWrt)
110119 [Documentation] Check presence of ethernet controller using lspci.
111120 ... Install pciutils if missing. Controller name defined in OPENWRT_ETHERNET_CONTROLLER.
121+ Skip If not ${TESTS_IN_OPENWRT_SUPPORT } OWR007.206 not supported
122+ Variable Should Exist ${OPENWRT_ETHERNET_CONTROLLER }
112123 Power On
113124 Boot OpenWrt
114125 Detect Or Install Package OpenWrt pciutils
0 commit comments