Skip to content

Commit

Permalink
Add a new function to find which renderer is running the process (New) (
Browse files Browse the repository at this point in the history
#1245)

* While testing without pci id, user couldn't know the process is running
on which renderer. Therefore, this change is going to:
* add a new function to get which GPU is executing the command that could
  help user to make sure the renderer is not llvmpipe.
* refactor some codes to make reuse easier.
* add PCI ID in the log to make verify easier.

* Fix typo

* Update providers/base/bin/prime_offload_tester.py

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>

* Update providers/base/bin/prime_offload_tester.py

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>

* Update providers/base/bin/prime_offload_tester.py

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>

* Update providers/base/bin/prime_offload_tester.py

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>

* Update providers/base/bin/prime_offload_tester.py

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>

* 1. using os.walk and open to replace grep and cat subprocess
2. removing _run_command
3. using run_with_timeout in the checkbox support to replace timeout
   command

* remove useless code and fix black issue

* Update providers/base/bin/prime_offload_tester.py

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>

* 1. rename _if_file_contain
2. add description for cmd[0]

* Fix black issue

* Fixed unit tests

* Mock test_nv_driver_check

* Mocking correct timeout function

* Add more unit tests

* fix unit test error

* Fix unit test error

---------

Co-authored-by: Fernando Bravo <39527354+fernando79513@users.noreply.github.com>
Co-authored-by: ferbraher <fernando.bravo.hernandez@canonical.com>
  • Loading branch information
3 people authored Sep 13, 2024
1 parent 21efaa7 commit ce70144
Show file tree
Hide file tree
Showing 2 changed files with 550 additions and 262 deletions.
Loading

0 comments on commit ce70144

Please sign in to comment.