Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions dasharo-compatibility/acpi-driver.robot
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ Default Tags automated


*** Variables ***
@{EXPECTED_OUTPUT}=
... dasharo_acpi-acpi-0
... Adapter: ACPI interface
@{EXPECTED_OUTPUT_1}=
... dasharo_acpi-isa-0000
... Adapter: ISA adapter
@{EXPECTED_OUTPUT_2}=
... dasharo_acpi-acpi-0
... Adapter: ACPI interface

@{EXPECTED_OUTPUTS}= ${EXPECTED_OUTPUT_1} ${EXPECTED_OUTPUT_2}
@{SUCCESS_OUTPUT}=
... Complete!
... already installed
... 0 newly installed
... Upgrading: 0, Installing: 0, Removing: 0
... Complete!
... already installed
... 0 newly installed
... Upgrading: 0, Installing: 0, Removing: 0


*** Test Cases ***
Expand All @@ -51,7 +56,7 @@ ACPI001.201 ACPI driver test (Ubuntu)
${out}= Execute Command In Terminal dpkg -s dasharo-acpi-dkms
IF "Status: install ok installed" not in """${out}"""
Download File
... https://github.com/Dasharo/osfv-test-data/raw/refs/heads/master/dasharo-driver/dasharo-acpi-dkms_0.0.1-1_amd64.deb
... https://github.com/Dasharo/osfv-test-data/raw/refs/heads/master/dasharo-driver/dasharo-acpi-dkms_0.9.1-1_amd64.deb
... /home/ubuntu/dasharo-acpi-dkms.deb
${out}= Execute Command In Terminal apt install /home/ubuntu/dasharo-acpi-dkms.deb -y
... timeout=60s
Expand All @@ -62,7 +67,7 @@ ACPI001.201 ACPI driver test (Ubuntu)
Should Be Empty ${out}
Detect Or Install Package lm-sensors
${out}= Execute Command In Terminal sensors
Should Contain All ${out} @{EXPECTED_OUTPUT}
Should Contain All From Any ${out} ${EXPECTED_OUTPUT_1} ${EXPECTED_OUTPUT_2}

ACPI001.202 ACPI driver test (Fedora)
[Documentation] Tests if ACPI drivers can be recognised
Expand All @@ -76,7 +81,7 @@ ACPI001.202 ACPI driver test (Fedora)
# Should Contain ${out}
IF "dasharo-acpi-dkms-0.0.1-1.x86_64" not in """${out}"""
Download File
... https://github.com/Dasharo/osfv-test-data/raw/refs/heads/master/dasharo-driver/dasharo-acpi-dkms_0.0.1-1.x86_64.rpm
... https://github.com/Dasharo/osfv-test-data/raw/refs/heads/master/dasharo-driver/dasharo-acpi-dkms-0.9.1-1.x86_64.rpm
... /home/linux/dasharo-acpi-dkms.rpm
${out}= Execute Command In Terminal sudo dnf install /home/linux/dasharo-acpi-dkms.rpm -y
... timeout=60s
Expand All @@ -91,4 +96,14 @@ ACPI001.202 ACPI driver test (Fedora)
... timeout=60s
Should Contain Any ${out} @{SUCCESS_OUTPUT}
${out}= Execute Command In Terminal sensors
Should Contain All ${out} @{EXPECTED_OUTPUT}
Should Contain All From Any ${out} ${EXPECTED_OUTPUT_1} ${EXPECTED_OUTPUT_2}


*** Keywords ***
Should Contain All From Any
[Arguments] ${out} @{expected_lists}
FOR ${expected_list} IN @{expected_lists}
${ok}= Evaluate all(word in """${out}""" for word in ${expected_list})
IF ${ok} RETURN
END
Fail Output did not match any expected list
6 changes: 3 additions & 3 deletions keywords.robot
Original file line number Diff line number Diff line change
Expand Up @@ -1246,11 +1246,11 @@ Download File
Wait Until Keyword Succeeds 5x 1s
... Check Internet Connection On Linux
${out}= Execute Linux Command
... wget --content-disposition --no-check-certificate --retry-connrefused -O ${local_path} ${remote_url}
... wget --no-check-certificate --retry-connrefused -O ${local_path} ${remote_url}
... ${timeout}
Should Contain ${out} 200 OK
Should Contain Any ${out} 200 200 OK
Should Contain ${out} ${local_path}
Should Contain ${out} saved
Should Contain Any ${out} saved Saving
Should Not Contain ${out} failed

Login To Linux With Root Privileges
Expand Down
Loading