Bug 205535

Summary: kunit_tool: support running KUnit from make
Product: Tools Reporter: Brendan Higgins (brendanhiggins)
Component: KUnitAssignee: Tools/KUnit virtual default assignee (tools_kunit)
Status: NEW ---    
Severity: enhancement CC: brendanhiggins
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: kselftest/test (5.4) Subsystem:
Regression: No Bisected commit-id:
Bug Depends on: 205253    
Bug Blocks:    

Description Brendan Higgins 2019-11-14 21:52:31 UTC
Quoting Ted:

How about if "make kunit" results in "./tools/testing/kunit/kunit.py run --build_dir=/.kunit --allconfig"

... where --allconfig automatically creates kunitconfig but in includes all of the CONFIG options which depends on CONFIG_KUNIT, so that all unit tests are run?    That way, we make it super easy for people to run the unit tests.  Since most users are used using make targets, this I bet will significantly increase the number of developers using kunit, because it will be super-duper convenient for them.

Also, it would be nice if kunit.py first looks for kunitconfig in build_dir, and then in the top-level of the kernel sources, and we put .kunit in .gitignore.   That will make "git status" look nice and clean.

I think this is a good suggestion.

Original discussion can be found here: https://groups.google.com/d/msg/kunit-dev/QmA27YEgEgI/oMsVVHoXDAAJ