[Kde-pim] Coding-style and tests

Ingo Klöcker kloecker at kde.org
Mon Mar 25 21:56:20 GMT 2013


On Monday 18 March 2013, Guy Maurel wrote:
> On Friday 08 March 2013 20:09:13 Ingo Klöcker wrote:
> > On Friday 08 March 2013, guy-kde wrote:
> > > Hello!
> > > 
> > > After any change(s) on the source(s) it is better to make some
> > > test(s). All will think that.
> > > But: do we have any tests, that test all the code? I think: not
> > > really.
> > > 
> > > My proposal:
> > > - *BEFORE* making a change, one save the object, ie.
> > > 
> > > kdepimlibs/build/akonadi/CMakeFiles/akonadi-kde.dir/entitytreevie
> > > w.cp p.o - make the change
> > > - compile the new source
> > > - compare the old and the new object.
> > > If no difference is shown, one may consider the change as "save".
> > 
> > I'm not sure the object code will be identical. Using ccache might
> > be a better alternative, i.e. if with ccache nothing is
> > re-compiled after changing the source code then the change is
> > safe.
> 
> ccache is used to speed-up the building of software.

Exactly. And, as far as I understand, it does this by transforming the 
source code into a normalized (or unified) form (i.e. all comments are 
stripped, all whitespace is normalized), at least in "preprocessor mode" 
and if CCACHE_UNIFY is set.

> My proposal provides as a first approach, a 100% testing of the
> binary code. In this case, the change(s) of the source(s) don't
> produce any binary change. They may be distributed. This is what I
> wanted to do now.

I understand. My point is, that with ccache you wouldn't have to perform 
the actual compilation, so that the check should be faster. OTOH, I 
don't even know whether one can use ccache this way, i.e. just for 
checking, but not for actually doing the re-compilation.

Doing what you propose is probably easier. And, since you are going to 
do the work, you decide. :-)


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20130325/7622b889/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list