RFC: script for build breaks prevention

Started by frantony, July 30, 2013, 09:49:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

frantony

The ML is not trivial software.
Adding a new feature for one platform
can break build for another camera.

To prevent the problems like this some techniques
are developed.

E.g. here is a quote from U-Boot's General Patch Submission Rules
  http://www.denx.de/wiki/U-Boot/Patches

Quote
Before sending the patch, you __must__ run
the MAKEALL script on your patched source tree
and make sure that no errors or warnings are
reported for any of the boards. Well, at least
not any more warnings than without your patch.

I have just made a relatively small and simple
script make-all.sh. It just builds
ML for all platforms. Also it quickly builds
documentation. At the final the script prints out
the statistics so it's easy to find a broken platforms
(if any): see the 'target failed to compile' field.

The script on bitbucket:

https://bitbucket.org/frantony/magic-lantern.makeall/commits/52a7be8070fbc52e73d0c2536467c648a201df6d


USAGE:

$ cd magic-lantern
$ make allsupported

...

make[2]: *** [shoot.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [100D] Error 2
FAILED
Compiled in    2s
Building  docq
OK
Compiled in    7s

===================== SUMMARY ============================

compiled in   50s
targets with warnings or errors: 18 ( 40D 50D 5D2 5DC 60D 7D 1100D 500D 550D 5D3 600D 650D 6D 7D_MASTER EOSM 700D 100D docq)
target failed to compile: 4 ( 40D 5DC 700D 100D)
make: *** [allsupported] Error 4


Please reply to this request!

Marsu42

Quote from: frantony on July 30, 2013, 09:49:09 PM
I have just made a relatively small and simple script make-all.sh

+1 for a nifty script that gives a pretty status report, though you usually don't compile docs for test builds and on Windows  I have found no way to do it at all because all tex builds and required utilities are semi-broken.

Btw. the real problem isn't that it doesn't compile, but that it doesn't work on all cameras which is impossible to tell if you don't have them all lying around. But feel free to donate a 5d3 to me, I'll make sure I test all my module code on it :->

nanomad

We could use the new build bot for that. It's written in python and support hooks. Have a look in the build-bot-2.0 folder
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5