Re: [Qemu-devel] [RFC PATCH 0/4] travis: run all coccinelle scripts

2017-06-27 Thread Markus Armbruster
Philippe Mathieu-Daudé  writes:

> Another item from my 'automated testing' list: use travis-ci to run coccinelle
> scripts. This series is more of a PoC. The idea would be to run it once a day
> only on /master.
>
> Patch 1 is here only to speedup travis testing.
>
> Patch 3 add a script which run each cocci script sequencially. If the script
> modified any file from the repo, changes are commited. If the script generated
> some output (i.e. using python), this output is logged in an empty commit.
> Spatch is run thru a debian-based Docker image.
>
> Patch 4 is the travis job: it calls the previous script. To respect travis 
> time
> limit timeout, each script is limited to <10min. If any commit were
> generated, they are pushed to my gh-repo:
>
> https://github.com/philmd/qemu/compare/travis-cocci_v1...philmd:autogenerated-coccinelle-20170625-126
>
> Build output (Ran for 23 min 7 sec):
> https://travis-ci.org/philmd/qemu/builds/246848085
>
> Any idea is welcome :)

Are we sure all the Coccinelle scripts always produce desirable and
correct results?  I often use Coccinelle to do the tedious 95% of the
job, followed by a bit of manual cleanup.  What if manual cleanup is
required to make things compile cleanly?  Say because the transformation
leaves unused variables behind.  What if the transformation is wanted in
19 out of 20 cases?  Say because it replaces a bulky expression by the
helper call created for this purpose (good), including in the helper
function (bad)?



Re: [Qemu-devel] [RFC PATCH 0/4] travis: run all coccinelle scripts

2017-06-25 Thread Philippe Mathieu-Daudé
> Patch 4 is the travis job: it calls the previous script. To respect travis 
> time
> limit timeout, each script is limited to <10min. If any commit were
> generated, they are pushed to my gh-repo

Initially I wanted to use git format-patch/send-email to send to the
list as a series but it seems too verbose and Travis doesn't seem to
allow to send mails. Another possibility is to send to a S3 bucket or
gh-page. The push-to-repo way involves deploy ssh key but is easier to
manage with regular git commands, I can fetch this repo and
cherry-pick/rework/amend commits.

I also plan to add Marc-André Lureau clang-tidy work:
http://lists.nongnu.org/archive/html/qemu-devel/2017-06/msg05034.html



[Qemu-devel] [RFC PATCH 0/4] travis: run all coccinelle scripts

2017-06-25 Thread Philippe Mathieu-Daudé
Another item from my 'automated testing' list: use travis-ci to run coccinelle
scripts. This series is more of a PoC. The idea would be to run it once a day
only on /master.

Patch 1 is here only to speedup travis testing.

Patch 3 add a script which run each cocci script sequencially. If the script
modified any file from the repo, changes are commited. If the script generated
some output (i.e. using python), this output is logged in an empty commit.
Spatch is run thru a debian-based Docker image.

Patch 4 is the travis job: it calls the previous script. To respect travis time
limit timeout, each script is limited to <10min. If any commit were
generated, they are pushed to my gh-repo:

https://github.com/philmd/qemu/compare/travis-cocci_v1...philmd:autogenerated-coccinelle-20170625-126

Build output (Ran for 23 min 7 sec):
https://travis-ci.org/philmd/qemu/builds/246848085

Any idea is welcome :)

Regards,

Phil.

Philippe Mathieu-Daudé (4):
  travis: simplify matrix
  coccinelle: ignore ASTs pre-parsed cached C files
  coccinelle: script to run them all
  travis: add job to run coccinelle scripts

 .gitignore |   2 +
 .travis.sshkey | Bin 0 -> 1296 bytes
 .travis.yml| 145 ++---
 scripts/check-cocci-scripts.sh |  47 +
 4 files changed, 69 insertions(+), 125 deletions(-)
 create mode 100644 .travis.sshkey
 create mode 100755 scripts/check-cocci-scripts.sh

-- 
2.13.1