Skip to content
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

Run cases in ipmi/test_ipmi_chassis.robot but got failed #2241

Open
nba2023 opened this issue May 21, 2024 · 3 comments
Open

Run cases in ipmi/test_ipmi_chassis.robot but got failed #2241

nba2023 opened this issue May 21, 2024 · 3 comments

Comments

@nba2023
Copy link

nba2023 commented May 21, 2024

Run the case IPMI Chassis Status On, and get error as follows:
The first error:

[ ERROR ] Error in file '/openbmc/extended/obmc_boot_test_resource.robot' on line 9: Importing library '/openbmc/lib/obmc_boot_test.py' failed: 
#(UTC) 2024/05/22 00:49:22.155861 -    1.461193 - **ERROR** Failed to find complete path for file "/openbmc/data/boot_lists/PDU_reboot".
shell_rc:                                         0x0000000000000001

Traceback (most recent call last):
  File "/openbmc/lib/obmc_boot_test.py", line 58, in <module>
    boot_lists = read_boot_lists()
  File "/openbmc/lib/boot_data.py", line 145, in read_boot_lists
    file_path = gm.which(dir_path + boot_category)
  File "/openbmc/lib/gen_misc.py", line 137, in which
    BuiltIn().fail(gp.sprint_error(error_message))
  File "/usr/local/lib/python3.6/dist-packages/robot/libraries/BuiltIn.py", line 534, in fail
    raise AssertionError(msg) if msg else AssertionError()
PYTHONPATH:
  /usr/local/bin
  /usr/lib/python36.zip
  /usr/lib/python3.6
  /usr/lib/python3.6/lib-dynload
  /usr/local/lib/python3.6/dist-packages
  /usr/lib/python3/dist-packages
  /openbmc/data/
  /openbmc/data/
  /openbmc/
  /openbmc/data/
  /openbmc/extended/

The end error:

No keyword with name 'OBMC Boot Test Py' found. Did you mean:
    obmc_boot_test_resource.OBMC Boot Test

Also keyword teardown failed:
No keyword with name 'OBMC Boot Test Teardown' found.
| FAIL |
No keyword with name 'OBMC Boot Test Py' found. Did you mean:
    obmc_boot_test_resource.OBMC Boot Test

Also keyword teardown failed:
No keyword with name 'OBMC Boot Test Teardown' found.

Anyone can help me to fix it? Thanks.

@nba2023
Copy link
Author

nba2023 commented May 21, 2024

Attachment file is the log.html.
log.zip

@gkeishin
Copy link
Member

@nba2023

  1. First is to move the Python up to 3.10 or 3.11
  2. Next please check the file if it's missing
Error in file '/openbmc/extended/obmc_boot_test_resource.robot' on line 9: Importing library '/openbmc/lib/obmc_boot_test.py' failed: #(UTC) 2024/05/21 05:24:58.969319 -    1.604266 - **ERROR** Failed to find complete path for file "/openbmc/data/boot_lists/PDU_reboot".

  1. Run the test from the top of the directory after cloning
git clone https://github.com/openbmc/openbmc-test-automation
cd openbmc-test-automation/

robot -v xxxxxx run from this directory

@nba2023
Copy link
Author

nba2023 commented Jun 5, 2024

@nba2023

1. First is to move the Python up to 3.10 or 3.11

2. Next please check the file if it's missing
Error in file '/openbmc/extended/obmc_boot_test_resource.robot' on line 9: Importing library '/openbmc/lib/obmc_boot_test.py' failed: #(UTC) 2024/05/21 05:24:58.969319 -    1.604266 - **ERROR** Failed to find complete path for file "/openbmc/data/boot_lists/PDU_reboot".
3. Run the test from the top of the directory after cloning
git clone https://github.com/openbmc/openbmc-test-automation
cd openbmc-test-automation/

robot -v xxxxxx run from this directory

Hi,
The case can run after upgrade python to 3.11.9 without the end error I mentioned on previous comment.
But still got same error as follows:

[ ERROR ] Error in file '/openbmc/extended/obmc_boot_test_resource.robot' on line 9: Importing library '/openbmc/lib/obmc_boot_test.py' failed: #(UTC) 2024/06/05 07:03:57.564355 -    0.191447 - **ERROR** Failed to find complete path for file "/openbmc/data/boot_lists/PDU_reboot".
shell_rc:                                         0x0000000000000001

Traceback (most recent call last):
  File "/openbmc/lib/obmc_boot_test.py", line 56, in <module>
    boot_lists = read_boot_lists()
                 ^^^^^^^^^^^^^^^^^
  File "/openbmc/lib/boot_data.py", line 145, in read_boot_lists
    file_path = gm.which(dir_path + boot_category)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/openbmc/lib/gen_misc.py", line 128, in which
    BuiltIn().fail(gp.sprint_error(error_message))
  File "/usr/local/lib/python3.11/site-packages/robot/libraries/BuiltIn.py", line 529, in fail
    raise AssertionError(msg) if msg is not None else AssertionError()
PYTHONPATH:
  /openbmc/lib
  /usr/local/bin
  /usr/local/lib/python311.zip
  /usr/local/lib/python3.11
  /usr/local/lib/python3.11/lib-dynload
  /usr/local/lib/python3.11/site-packages
  /openbmc/data/
  /openbmc/data/
  /openbmc/data/
  /openbmc/extended/
  /openbmc/data/
  /openbmc/extended/
Openbmc.Ipmi.Test Ipmi Chassis :: Module to test IPMI chassis functionality.

I enter to docker container and check the missing file under /openbmc
root@vm:/home/user# docker exec -it 008 bash

root@vm:/openbmc# cat /openbmc/data/boot_lists/PDU_reboot
APOR
APOR (mfg)
PDU AC Cycle (run)
PDU AC Cycle (run) (mfg)
PDU AC Cycle (off)
PDU AC Cycle (off) (mfg)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants