-
-
Notifications
You must be signed in to change notification settings - Fork 6
OpenWRT automation #1128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
OpenWRT automation #1128
Conversation
Signed-off-by: Mateusz Maciejewski <[email protected]>
Crucial lab network setup added to OWR001.206 after reboot. lib/openwrt.robot: OpenWrt library introduced. Signed-off-by: Mateusz Maciejewski <[email protected]>
Documentation strings added/expanded. Signed-off-by: Mateusz Maciejewski <[email protected]>
Signed-off-by: Mateusz Maciejewski <[email protected]>
f2521df
to
a8f9f96
Compare
License info added on pre-commit request. Signed-off-by: Mateusz Maciejewski <[email protected]>
|
||
# Log Out And Close Connection - elementary teardown keyword for all tests. | ||
Suite Setup Run Keywords | ||
... Prepare Test Suite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we have a flag for this OS here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8feebcb
... DTS is boot via iPXE and OpenWrt image is downloaded using wget. | ||
... OPENWRT_IMAGE_LINK - image link to download via wget | ||
... OPENWRT_IMAGE_FILE - core of file name | ||
... OPENWRT_TARGET_DEVICE - target drive to be wiped out using dd (!) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the beginning of the test, ensure that the required variables are there (e.g. via https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Variable%20Should%20Exist)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8feebcb
Boot Dasharo Tools Suite iPXE | ||
Enter Shell In DTS | ||
VAR ${openwrt_image_gz}= ${OPENWRT_IMAGE_FILE} .gz separator=${EMPTY} | ||
Remove File ${openwrt_image_gz} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not want to add it to osfv-data? We have been adding other ISOs (such as DTS and TinyCore there). Aren't we reinveinting it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to osfv-test-data in d1a468a
Uploaded to DTS via SSH. osfv-test-data PR: Dasharo/osfv-test-data#14
Remove File ${openwrt_image_gz} | ||
Remove File ${OPENWRT_IMAGE_FILE} | ||
Download File ${OPENWRT_IMAGE_LINK} ${openwrt_image_gz} | ||
Execute Linux Command gunzip ${openwrt_image_gz} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I often use a single command, like: gzip -cdk bootstrap-pendrive_v005.img.gz | sudo dd of=/dev/sda bs=16M
(it's just an example taken from bash history)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8feebcb
Remove File ${OPENWRT_IMAGE_FILE} | ||
Download File ${OPENWRT_IMAGE_LINK} ${openwrt_image_gz} | ||
Execute Linux Command gunzip ${openwrt_image_gz} | ||
Execute Linux Command dd if=${OPENWRT_IMAGE_FILE} of=/dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of=/dev
? This does not look correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably meant:
Execute Linux Command dd if=${OPENWRT_IMAGE_FILE} of=/dev | |
Execute Linux Command dd if=${OPENWRT_IMAGE_FILE} of=/dev/${OPENWRT_TARGET_DEVICE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 8feebcb
Execute Linux Command gunzip ${openwrt_image_gz} | ||
Execute Linux Command dd if=${OPENWRT_IMAGE_FILE} of=/dev | ||
Execute Linux Command sync | ||
Power On |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would Execute Reboot Command
work here rather than hard power cycle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8feebcb
|
||
OWR003.206 Boot operating system from disk after cold-boot (OpenWrt) | ||
[Documentation] Boot OpenWrt from hard disk after cold-boot. | ||
VAR @{supported_power_ctrls}= RteCtrl sonoff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this low-level stuff in test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in d1a468a
Power On | ||
Boot OpenWrt | ||
Execute Command In Terminal poweroff | ||
Power On |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it will be warm boot? Doesn't Power On remove power from the board?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 8feebcb
|
||
|
||
*** Test Cases *** | ||
OWR001.206 Install operating system on disk (OpenWrt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think test case should be gated by some _INSTALLED
variable, or we should check if the OS is not present yet before running it. It'd be kinda annoying to have OpenWRT install each time we re-run this test to correct a single random fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done by adding confirmation Dialog (install & desttroy data on device or skip) in 8feebcb
rtcwake static binary now provided via cloud download, simplified Download File kw added to lib/openwrt.robot Signed-off-by: Mateusz Maciejewski <[email protected]>
Power control logics removed, os image moved to osfv test data and uploadet to DUT (DTS) via SSH. Signed-off-by: Mateusz Maciejewski <[email protected]>
971d493
to
d1a468a
Compare
OpenWrt automation: installation. boots, WiFi & Ethernet detection.
Test logs: users/mmaciejewski/OpenWrt/openwrt_os-openwrt_2025_10_14_11_25_52