[hipl-dev] Re: [Merge] lp:~hipl-core/hipl/libhip into lp:hipl

  • From: Miika Komu <mkomu@xxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Mon, 13 Feb 2012 09:32:04 +0200

Hi,

On 02/13/2012 09:14 AM, Diego Biurrun wrote:
On Mon, Feb 13, 2012 at 07:47:31AM +0200, Miika Komu wrote:
On 13/02/12 00:26, Diego Biurrun wrote:

True, but you should also not rearrange things w/o need to do so.
I'll try to update HACKING this week, there's a bunch of stuff I
wanted to add in there.
....
I didn't know there are other testing methods like 'make alltests'
and autobuilder, but before every commit I make sure the code pass
the 'make check'. from now on I will also check 'make alltests'.
Could you give some hints about how to use the autobuilder you
mentioned?

Who is mentoring you over in Finland and why are they not giving you
appropriate hints? :)

The autobuilder is the script tools/hipl_autobuild.sh, it should work
if you run it directly.

You could also just read Makefile.am to find out about available targets.
You could also read the output of configure to see which options are
enabled or not.  Also look at 'configure --help' for available options.

actually, I mistakenly assumed that alltests and hipl_autobuild.sh were
already.

.. were already .. what?  Sorry, I honestly don't know what you are
trying to say here ...

...already documented in HACKING. (Sorry, I swallowed the end :)

Btw, hipl_autobuild.sh is still semi-automated and a bit tedious to set
up. It is designed to be run from crontab rather than effortless
execution from the command line.

No, no, no, it was never "designed" to be run from cron.  The cronjob
that runs the autobuilder does run from cron, true, but all it does is
call tools/hipl_autobuild.sh from the command line.

Why is the emphasis then on the cron execution? Observe the beginning of tools/hipl_autobuild.sh:

# HIPL autobuild script for periodic compilation and quality tests.
..
# The script is suitable to be run from cron in order to provide basic

Previously it would expect a command line parameter to indicate the branch
it was supposed to test, but I recently changed it to derive a suitable
default from Bazaar.  It also used to expect a certain home directory
layout in order to run the OpenWrt and MAEMO cross-compilation tests.
Now it bails out with a message if those are not found, but even before
it would run all the previous tests just fine.

Thanks for the history lesson but this doesn't still work out of the box:

mkomu@bling:~/projects/hipl-bzr/trunk$ tools/hipl_autobuild.sh
usage: tools/hipl_autobuild.sh <branch_name>
mkomu@bling:~/projects/hipl-bzr/trunk$ tools/hipl_autobuild.sh trunk
bzr: ERROR: Not a branch: "/home/mkomu/src/hipl/trunk/".
cat: /home/mkomu/tmp/autobuild/hipl/HIPL_REVISION_trunk: No such file or directory

Feel free to say "fix it yourself" or "you're too lazy/stupid/busy to figure to this out" but don't give any excuses why this is perfect as it is because it isn't.

IMHO, the best way to improve would be to integrate this somehow into
"make alltests". A better than nothing alternative is to document
copy-paste-instructions to HACKING explaining "what do I need to
execute from the command line" to get it working instead forcing all
developers to read the source code of the script and set it up using
the trial-and-error method.

The script has a verbose documentation block at the top.  Duplicating
that I do not consider a good idea, it will only get out of sync.

IMHO, the script documents the design but not the usage.

Based on this comment, we don't even need the HACKING or manual because all you need is the source code.

Other related posts: