Commit Graph

77 Commits

Author SHA1 Message Date
Justin Newberry
05dc0b51e6 test_models: fallback to public route when route isn't uploaded to CI bucket (#30794)
* wip

* add public comment

* fix that

* wip

* retrigger
2023-12-20 11:29:19 -08:00
Shane Smiskol
5052b55c44 test_models: fuzz test panda and CarState (#30443)
* pre-hypothesis

* some hypothesis junk

* this kinda works but is really slow due to counter check

* choose addrs from fingerprint

* stash

* honda nidec brake pressed mismatches fixed

* bump panda

* stash

* tesla: use DI_torque2 (panda msg)

* run

* run

* ah this honda mismatch too

* no more multi can msgs

* clean up, remove old file

* add todo

* prob can remove urandom

* stash, huge examples

* fix pq standstill mismatch

* yuge

* yup there's a leak somewhere

* try to find leak

* skip dashcam (pq and tesla)

* PR comments

* bump

* draft stash

* fix alt brake hondas

* bump

* bump

* bump

* some clean up

* minor clean up

* more clean up

* stash

* fix honda bug

* more

* 100 examples

* revert tesla

* no memory leak any more?

* bring back tests with skips

* parameterize max_examples

* skip interceptor

* is jenkins on my branch?

* ooh that's fast

* 50 is not bad for GH CI

* 300 might be better with rest of test_models

* no more detection

* bump

* need CS_prev to catch bugs where openpilot changes and panda doesn't (eg. not setting interceptor safety mode)

* need to simplify all this

* need a warm up first, since some signals are 1 by default (toyota's gas_released!=1)

* changes

* set honda safety param

* set toyota safety param

* bump panda

* clean up honda

* rm interceptor

* thought interleaving addrs might help, but we can fine tune later

* Revert "thought interleaving addrs might help, but we can fine tune later"

This reverts commit 153301384b48c9f33f9e2af3c224241eaeec41c1.

* get size from dict

* what

* add nocapture marker

* clean up

* try to raise logging level

* need to run last as pytest_runtest_call, since it starts capturing

* get capman conditionally

* mark

* type fingerprint

* should use gen_empty_fingerprint

* no longer needed

* draft

* no longer need gc

* clean that up

* test everything!

* more clean up

* more

* no point

* fix that

* fix errors

* bump

* nice even 300 examples for 300 segs

* final bump :fingers_crossed:

* better import order

* remove debugging prints

* warm up kinda works

* Revert "warm up kinda works"

This reverts commit 7fc77b07d592edb13eadca77deb49540954a7d69.

* random seed

* revert

* strat

strat

* add expl comment

* cmt

* check controls allowed

* Revert "check controls allowed"

This reverts commit e82a0e5396810dd4670e6847aa555194a709e10f.

* not unittests

* run tests!

* run tests 2!

* run tests 3!

* seed unused

* revert

* add shrink phase, and remove health check suppression

* hello

* oncemore

* Update selfdrive/car/tests/test_models.py
2023-12-19 03:18:54 -06:00
Shane Smiskol
d9a8846d58 test_models: use gen_empty_fingerprint (#30752)
use gen_empty_fingerprint
2023-12-15 17:16:19 -08:00
Shane Smiskol
123ef46af3 Revert "test_models: check consitency between panda and openpilot for velocity (#30750)" (#30753)
This reverts commit 1ca1cf3922.
2023-12-15 17:16:01 -08:00
Justin Newberry
1ca1cf3922 test_models: check consitency between panda and openpilot for velocity (#30750)
* sanity check on velocity

* import from there

* use raw

* just check last

* ignore body

* reduce tolerance and bump panda

* its not average anymore

* slightly higher tolerance
2023-12-15 14:50:37 -08:00
Shane Smiskol
ac83318ac4 test_models: randomize internal segment list (#30653)
* randomize internal seg list segments

* random

* pytest-randomly sets random.seed to a consistent value for all the workers/processes

* noeol

* update

* Revert "update"

This reverts commit aff9a69c4e5e3934deebaa33986b42f44b55b002.

* lock

* don't randomize by default

* remove random-order

* strict

* random

* one fix

* test

* does nothing

* rm tests

* Revert "rm tests"

This reverts commit b548e3fcd48e60538695506888d863c01b459d27.

* (can't repro locally) just athena should be fine

* bs1

* bs2

* bs3

* bs4

* bs5

* wrong way

* no controls

* no car

* no board

* controls?

* crazy -common

* Revert "crazy -common"

This reverts commit 02365d712b3d09cab1893cce2261a4b418bb3851.

* test athena

* test athena 2

* test athena 3

* test athena 4

* test athena 5

* test athena 6

* test athena 7

* test athena 8

* test athena 9

* ??

* in one commit

* common?

* car and board

* -controls -board

* random-order

* no board

* revert

* car/tests

* least likely

* try

* try 2

* draft

* draft

* so much better

* cmt

* use randomly

* not needed here

* directly modify option works

* bb

* test time

* Revert "test time"

This reverts commit 2c5caabe2b470b47b7322e37800680b92773fccc.

* tmut

* i concur

* revert
2023-12-09 14:28:32 -08:00
Justin Newberry
f16df8e4b7 pytest: group test_models by route instead of car name (#30625)
* group by route

* dont need those
2023-12-06 16:00:59 -08:00
Adeeb Shihadeh
613ccf4b74 falsify rx checks (#30564) 2023-11-30 14:53:33 -08:00
Adeeb Shihadeh
afd61352d0 bump panda (#30501)
* bump panda

* bump

* bump

* fix renamed variables

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-11-20 14:45:51 -08:00
Shane Smiskol
fc8cfe1280 test_models: check if in relay-breaking safety mode (#30476)
* remove initData, remove tolerance

* can check faster now

* don't
2023-11-15 18:57:37 -08:00
Shane Smiskol
e44d84a7f9 test_models: remove ignored address check list (#30475)
* remove ignore_addr_checks_valid

* lessgoooo
2023-11-15 18:50:39 -08:00
Justin Newberry
31c682d407 Pytest: load by group by default (#30466)
* wip

* use a class marker

* this one should be grouped too
2023-11-14 17:33:47 -08:00
Justin Newberry
0251742079 CI: use "slow" marker for pytest (#30063)
* skip to mark

* fix quotes
2023-09-26 13:44:18 -07:00
Shane Smiskol
1410a1150c test_models: check controlsd events (#29907)
* test_moedls: check controlsd events

* clean up

* sort

* controlsd modifies CP

* fix

* can use any segment now

* final fix

* use constant
2023-09-14 20:20:49 -07:00
Lee Jong Mun
238f9d65db cleanup remnants of LQR and INDI tuning (#29860)
* not use 'indi' cleanup

* bump cereal

* rm more

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-09-10 16:30:13 -07:00
Shane Smiskol
5d1550de87 test_models: detect when OBD multiplexing/fingerprinting (#29759)
* wait to leave elm mode before checking relay malfunction

* clean up

* clean up

* pycharm is best

* clean up

* more

* use pandaStatesDEPRECATED

* fix

* use constant

* only radar

* cmt

* set inline

* comment and re-arrange

* enable for relay malfunc check

* down here

* Update selfdrive/car/tests/test_models.py

* rm

* don't affect other tests

* up here

* one line

* update cmt

* no tolerance

* Revert "no tolerance"

This reverts commit 41b1c7e8beda87a878c3bb1f37ec96b256965966.

* comment is real solution

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2023-09-05 21:22:36 -07:00
Justin Newberry
4c039ab022 Tests: disable laika tests in CI (#29742)
skip laika
2023-08-31 17:17:07 -07:00
Justin Newberry
1ee6ed4b16 Linter: remove pylint (#29611)
remove pylint
2023-08-24 16:30:54 -07:00
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Shane Smiskol
3563292e65 test_models: remove body standstill exception (#29453)
* remove body exception

* bump to master
2023-08-17 16:26:30 -07:00
Shane Smiskol
9d0d59ac9b Hyundai: match panda standstill check (#29442)
* bump panda

* clean up

* common?

* Revert "common?" (not now)

This reverts commit 197af7cdbb6a8c8e58fcbccca94f7db004ce91e4.

* fix

* no failures!

* remove time

* bump

* bump

* undo
2023-08-17 00:06:38 -07:00
Shane Smiskol
2d636deb4e test_models: check panda cruise state (#29423)
* cruise state test

* add todo

* rename

* clean up

* remove
2023-08-15 23:55:53 -07:00
Shane Smiskol
e2910d0720 CANParser: perf benchmark on route script (#29324)
* timing test

* test

* fix

* print

* loop

* clean up

* wider range

* Update selfdrive/car/tests/test_models.py

* Apply suggestions from code review

* run many times

* Update selfdrive/car/tests/test_models.py

* run for many its

* run with unittest and print as list

* Update .github/workflows/selfdrive_tests.yaml

* Update .github/workflows/selfdrive_tests.yaml

* total time is super inconsistent (body)

* Update selfdrive/car/tests/test_models.py

* clean up

* clean up

* clean up

* this works!

* draft

* test suite not as modular

* try something like this

* can do kb, but not too representative

* clean up

* remove kb? it depends on signals

* clean up

* more clean up

* rename

* just measure all CANParsers

* can do all this manually

* but this is way simpler

* comment

* fix mypy

* this is correct too

* 3 seconds instead of 1.5
2023-08-15 20:06:15 -07:00
Shane Smiskol
6ec00f5ee2 test_models: more typing (#29420)
* not type checked, but we set this in test_car_model

* type this
2023-08-15 20:01:33 -07:00
Shane Smiskol
936f8b9817 test_models: some typing (#29413)
* type

* also type check this func

* unused
2023-08-15 15:25:36 -07:00
Shane Smiskol
fb235238ad jenkins: re-enable test_models (#29394)
* re-enable test_models

* now?

* Remove bad Volt segment

* Update Jenkinsfile

* use first n segments
2023-08-14 16:08:34 -07:00
Shane Smiskol
001d4e8729 test_models: match online fingerprinting behavior (#29306)
* draft

* 1x

* clean up

* final clean up

* fix

* self explan

* space

* space
2023-08-11 18:33:11 -07:00
Shane Smiskol
1099b3486a test_models: check relay malfunction (#29270)
* check relay malfunction in test_models

* draft

* actual relay malfunction (or ASCM was turned on)

* rav4: not dashcam and op enabled, but we're not sending anything

* clean up

* spaces

* more space

* flip

* better?

* combine

* for

* move up
2023-08-11 18:10:27 -07:00
Shane Smiskol
70b1e9dd75 test_models: run on route list (#26226)
* move to openpilot

* draft

* support internal urls

* not used

* update seg list

* regen segment list

* regen seg list

* regen

* regen

* regen

* no dirty segments

* regen seg list with no fuzzy or fixed fp

* regen segments with hda2 exception

* regen with added filters

* regen without bad dongle

* regen

* regenerate!

* regenerate, only OP enabled

* regen

* regenerate!

* regenerate!

* stash

* use SegmentName

* new route list

* add temp comment

* remove comment

* let's see if this works

* comment out other tests to speed up

* fix agent

* ?

* hmm

* oh whoops...

* add matrix

* fix

* how many levels do we need?

* fix values

* matrix can't be in parallel

* how about this

* try this

* Revert matrix

Revert "try this"

This reverts commit 8d0d91fd70c467c1fbb4e4e9aed511d15b2a30ef.

Revert "how about this"

This reverts commit a8e4fc53234824e77cbfb1e471277bc033e9dea1.

Revert "matrix can't be in parallel"

This reverts commit daaa6fcc3c75c74cbb90e97c565099a94123994c.

Revert "fix values"

This reverts commit df554b6a3371d124a574eb8d26bc51ef5b5b8fde.

Revert "how many levels do we need?"

This reverts commit 1a17320fa1c5e7220ef60e29981bbb3bb7da16c6.

Revert "fix"

This reverts commit e7eb6e404358fbd2eac3fea1901a8d30ea92d729.

Revert "add matrix"

This reverts commit a1b57e5725417d3c2f639f8edfc0c889b84b6753.

* use pytest instead! (5 jobs is ~150 mins)

* split lines, uncomment

* This Sienna seg has a fault SDSU that stopped forwarding/sending msgs

* picked a route with no PSCMStatus and no panda errors, recent routes are working

* this cadillac was dashcammed (no radar)

* opened an issue for this, it's 'expected' right now

* small clean up

* small clean up

* i don't think that worked

* is this needed?

* add to new PC tests

* cache

* draft

* Revert "draft"

This reverts commit 3b7f740dd4883118747300bc3687074c2d3c2116.

* probably should be function

* draft

* clean up

* add todo

* 600 random segments

* debug

* does this fix pythonpath issues?

fix

* try this

* mount?

* pytest again!

* no need for PYTHONPATH now

* Update Jenkinsfile

* ?

* convention

* clean up

* would be even more complex (have to unset ci which is class level)

* track

* is lfs pulled at all?

* ah no it's not
2023-08-10 00:45:23 -07:00
Shane Smiskol
80bbba14f7 test_models: panda safety tx test (#28949)
* draft

* assertrue

* this is way too complicated, even with unittest discover

* works

* test we can send resume button

* nice catches this

* fix

* fixed

* not needed

* draft

* works

* comment out to let catch

* clean up into a function

* clean ups

* final clean up

* no this is final

* bump

* simplify

* simplify

* pass

* bump

* globals don't work inside methods

* space
2023-07-20 23:16:43 -07:00
Shane Smiskol
f6390c6e40 test_models: don't skip test cases with multiple pytest jobs (#28953)
* Update test_models.py

* Update selfdrive/car/tests/test_models.py

* Update selfdrive/car/tests/test_models.py
2023-07-14 16:24:07 -07:00
Shane Smiskol
c9c636bdd7 test_models: fix rx message bus (#28947)
Update test_models.py
2023-07-14 14:04:24 -07:00
Shane Smiskol
5aebdb0ad0 Car docs: pass docs flag to car interfaces (#27311)
* docs

* docs

* docs

* docs

* use docs in gm
2023-04-18 12:22:22 -07:00
Shane Smiskol
8f5057ff2d GM: enforce steering command message timing (#27250)
* draft

* bump opendbc

* still draft

* that's not right

* superset of the changes, 33hz

* cleanup

* this should work

* remove line

* pass it in again

* actually no need to check updated now

* now_nanos

* consistent name

* fix replay

* one line isn't that bad

switch

switch

* fix CarController tests

* Update ref_commit
2023-02-09 15:37:39 -08:00
Shane Smiskol
b2c6d5d34a Honda: merge Passport platform into Pilot (#27061)
* Move Passport FW versions to Pilot

* lol, all duplicates already in pilot

* No Passport

* Better params for both
2023-01-23 20:16:50 -08:00
Shane Smiskol
29470d2d2d VW: match panda standstill check (#25761)
* test models: check panda standstill

* match panda

* reverse exception

* check == 0

* bumppanda

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-01-10 22:28:54 -08:00
Shane Smiskol
01dac5d06b Build panda/SConscript (#26646)
* panda/SConscript

* think this is right?

* bump panda

* fix test_models

* use a filter

* bump panda to mater

* more aesthetic ordering

* alphabetical :(

* alphabetical :(
2022-11-30 20:27:55 -08:00
Shane Smiskol
74b6e22a7d controls: disengage on regen paddle independently (#26453)
* add regen braking field that's just used to add a pedalPressed

* bump

* bump

* Update ref_commit

* we want the standstill check

we want the standstill check

* see what diff is now

* Update ref_commit
2022-11-10 19:06:31 -08:00
Shane Smiskol
0e162cc13b test_models: fix Nidec routes that start enabled (#26305)
* Update test_models.py

* Update test_models.py

* fix non-pcmCruise routes where button is left pressed in warmup

* more explicit, don't allow multiple continues

* revert chjange

* -that
2022-10-31 23:02:31 -07:00
Shane Smiskol
23d5e5e07f test_models: speed up test (#26304)
* Update test_models.py

* Update test_models.py
2022-10-31 21:32:17 -07:00
Shane Smiskol
4d7bdc271f test_models: remove carState test from panda tests (#26298)
Update test_models.py
2022-10-31 17:45:56 -07:00
Shane Smiskol
d793d3622b test_models: fix runaway memory growth for long running tests (#26295)
* delete can msgs

* only can msgs
2022-10-31 13:54:13 -07:00
Shane Smiskol
826d8a8ae3 GM: match panda & ECM standstill checks (#26095)
* gm: match panda standstill check

* fix

* needs to be <= 10 to avoid a fault, fix for safety tests

* fix

* fix

* bump panda to master
2022-10-18 11:24:13 -07:00
Shane Smiskol
86062fee6b Subaru: match panda standstill (#25789)
* subaru: match panda standstill

* subaru: match panda standstill

* actually test standstill

* bump panda to master
2022-09-14 19:11:49 -07:00
Shane Smiskol
d3795c1227 Chrysler: match panda standstill check (#25762)
* bump panda

* bump panda to master

* flip this around

* don't forget the body!
2022-09-13 14:14:22 -07:00
Shane Smiskol
4d351427c5 Consider regen properly in test_models (#25409)
* Consider regen properly in test_models

* bump panda

* bump panda

* can use the more interesting segment now

* rm
2022-09-13 00:22:58 -07:00
Adeeb Shihadeh
655a64b603 single longitudinal toggle for e2e and disable radar (#25688)
* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
2022-09-07 17:12:49 -07:00
Shane Smiskol
b34fe711b0 Toyota: same standstill check as panda (#25570)
* Same standstill check as panda

* test honda in the same place

* bump panda

* bump panda

* bump panda

* bump to master

* bump panda
2022-08-31 13:51:10 -07:00
Adeeb Shihadeh
6590fb2b93 pre-commit: add codespell (#25571) 2022-08-30 11:20:55 -07:00
Shane Smiskol
19810f2dcc Silence a PytestCollectionWarning (#25537)
Silence PytestCollectionWarning: cannot collect test class 'TestRoute' because it has a __new__ constructor (from: test_models.py)
2022-08-23 17:26:29 -07:00