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

Unable to run unit tests #30455

Closed
nworb-cire opened this issue Nov 14, 2023 · 4 comments
Closed

Unable to run unit tests #30455

nworb-cire opened this issue Nov 14, 2023 · 4 comments
Labels
CI / testing PC Issues related to running openpilot on PC

Comments

@nworb-cire
Copy link
Contributor

Describe the bug

I am unable to run panda unit tests on a fresh clone of master. This appears to be related to 2ad82cb.

Steps to reproduce:

cd /data
rm -rf openpilot scons_cache
git clone --filter=blob:none --recurse-submodules https://github.com/commaai/openpilot.git
cd openpilot
scons -j$(nproc)
python3 -m pytest panda/tests/safety

ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: -n --dist=loadscope panda/tests/safety
  inifile: /data/openpilot/pyproject.toml
  rootdir: /data/openpilot

OS Version

AGNOS 8.2

openpilot version or commit

No response

Additional info

No response

@nworb-cire nworb-cire added the PC Issues related to running openpilot on PC label Nov 14, 2023
@sshane
Copy link
Contributor

sshane commented Nov 14, 2023

@jnewb1 is this expected to work on device?

@jnewb1
Copy link
Contributor

jnewb1 commented Nov 14, 2023

agnos doesn't have xdist installed (until commaai/agnos-builder#181 and next agnos release), so it won't work on device. CI uses the test.sh script within tests/safety/, which is what I would recommend to run the panda tests.

@jnewb1 jnewb1 closed this as completed Nov 14, 2023
@adeebshihadeh
Copy link
Contributor

Generally, this is expected to work, but we didn't want to delay some pytest refactors on an AGNOS update. For now, you can pip install the new packages on your device.

@jnewb1
Copy link
Contributor

jnewb1 commented Dec 6, 2023

we just released agnos9 which should fix this issue when you rebase to master. for running some HIL test, you may have to specify -n 1 to run single threaded, but the panda safety tests should run well in parallel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI / testing PC Issues related to running openpilot on PC
Projects
None yet
Development

No branches or pull requests

4 participants