backports: add support for testing only a single Coccinelle SmPL patch
You can just pass now one cocci file with the --test-cocci to test
only that single Coccinelle SmPL patch. If you are not sure what
an SmPL patch produces and you only want to study the results of
applying only a single SmPL patch you can use this flag to trigger
enabling git on the target directory, a commit will be done before
applying the SmPL patch and then another commit will be performed
after the SmPL patch is applied. You can then use git show as you'd
expect to inspect the results.
Note that if you don't use --test-cocci and run gentree.py regularly
you can always still use --git-debug to see atomically what is happening
after each patch, including Coccinelle patches.
This modifies the coccinelle library to use 10 * num_cpus threads
for when in testing Coccinelle mode.
$ time ./gentree.py --clean --verbose --test-cocci 11-dev-pm-ops.cocci \
Note that you can pass either a full path or the file name alone
of the target Coccinelle SmPL patch you want to test.
Cc: Peter Senna <firstname.lastname@example.org>
Cc: Julia Lawall <email@example.com>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>
Signed-off-by: Luis R. Rodriguez <firstname.lastname@example.org>
2 files changed