From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] Modify buildstats to be merged inside buildhistory
Date: Fri, 01 Nov 2013 18:07:17 +0000 [thread overview]
Message-ID: <1383329237.6271.62.camel@ted> (raw)
In-Reply-To: <1383329028-24348-1-git-send-email-corneliux.stoicescu@intel.com>
On Fri, 2013-11-01 at 19:03 +0100, Corneliu Stoicescu wrote:
> - added buildstats inheritance inside buildhistory
> - reworked the buildstats directory structure not to contain the build name(read: the build start date).
> Now it only contains the target name and machine. This is usefull in order to reduce git noise.
> - because builds are no longer separated by build name(read: date) it is necessary to remake(remove and create from scratch)
> the buildstats folder for each build in order keep buildstats compatible with tools like pybootchartgui.py
>
> Some changes to make the new functionality compatible with Yocto:
> - remove buildstats from default usage because it now needs buildhistory (remove it from USER_CLASSES in local.conf)
> - add 'buildhistory' to USER_CLASSES or add INHERIT += "buildhistory" in local.conf
> OPTIONAL: - I tested this patch with buildhistory under git enabled (BUILDHISTORY_COMMIT = "1" in local.conf). I believe this
> should be made default.
>
> I made some tests with the buildhistory-diff tool and it is compatible with the changes. We can add further functionality
> to it in order to make it interpret buildstats data.
>
> Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
> ---
> meta/classes/buildhistory.bbclass | 1 +
> meta/classes/buildstats.bbclass | 8 ++++++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
> index 3da03c8..a78bd4b 100644
> --- a/meta/classes/buildhistory.bbclass
> +++ b/meta/classes/buildhistory.bbclass
> @@ -19,6 +19,7 @@ BUILDHISTORY_PUSH_REPO ?= ""
>
> # Must inherit package first before changing PACKAGEFUNCS
> inherit package
> +inherit buildstats
> PACKAGEFUNCS += "buildhistory_emit_pkghistory"
We could do a
BUILDSTATS_BASE = "${BUILDHISTORY_DIR}/buildstats"
in buildhistory.bbclass
> # We don't want to force a rerun of do_package for everything
> diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
> index 72fff11..476ae94 100644
> --- a/meta/classes/buildstats.bbclass
> +++ b/meta/classes/buildstats.bbclass
> @@ -1,4 +1,4 @@
> -BUILDSTATS_BASE = "${TMPDIR}/buildstats/"
and here do BUILDSTATS_BASE ??= "${TMPDIR}/buildstats/"
> +BUILDSTATS_BASE = "${BUILDHISTORY_DIR}/buildstats"
> BNFILE = "${BUILDSTATS_BASE}/.buildname"
> DEVFILE = "${BUILDSTATS_BASE}/.device"
so when buildhistory is used, buildstats automatically becomes part of
it?
> @@ -33,7 +33,7 @@ def set_bn(e):
>
> def get_bn(e):
> with open(e.data.getVar('BNFILE', True)) as f:
> - bn = f.readline()
> + bn = str(f.readline()).split("/")[0]
> return bn
>
> def set_device(e):
> @@ -175,6 +175,10 @@ python run_buildstats () {
> # set the buildname
> ########################################################################
> try:
> + bb.utils.remove(e.data.getVar('BUILDSTATS_BASE', True), recurse=True)
Do we need to remove this?
I'll let Paul comment on other elements of this.
Cheers,
Richard
> + except:
> + pass
> + try:
> bb.utils.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
> except:
> pass
next prev parent reply other threads:[~2013-11-01 18:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 18:03 [PATCH] Modify buildstats to be merged inside buildhistory Corneliu Stoicescu
2013-11-01 18:07 ` Richard Purdie [this message]
2013-11-03 11:37 ` Stoicescu, CorneliuX
2013-11-04 9:16 ` Richard Purdie
2013-11-04 9:24 ` Stoicescu, CorneliuX
2013-11-04 9:31 ` Richard Purdie
2013-11-04 12:14 ` Paul Eggleton
2013-11-04 12:34 ` Richard Purdie
2013-11-04 12:42 ` Stoicescu, CorneliuX
2013-11-07 10:38 ` Paul Eggleton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383329237.6271.62.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=corneliux.stoicescu@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.