public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [RFC 3/4] ci: Test for isar-apt reuse
Date: Thu,  2 Sep 2021 11:58:16 +0200	[thread overview]
Message-ID: <20210902095817.32165-4-ubely@ilbers.de> (raw)
In-Reply-To: <20210902095817.32165-1-ubely@ilbers.de>

The approach: after first build of some target can remove
all temporary files, leaving tmp/deploy/isar-apt. Second
build should use packages from it without rebuilding.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 scripts/ci_build.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 837cd67..e62c02a 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -203,8 +203,18 @@ if [ -n "$REPRO_BUILD" ]; then
     sed -i -e 's/^#BB_NO_NETWORK/BB_NO_NETWORK/g' conf/local.conf
     bitbake $BB_ARGS $REPRO_TARGETS_SET
     while [ -e bitbake.sock ]; do sleep 1; done
+    # Check reuse of isar-apt repository
+    sudo rm -rf tmp/cache tmp/sstate-cache tmp/work tmp/stamps
+    sed -i -e 's/^ISAR_APT_ALWAYS_REBUILD_ON_CHANGE ?= "1"/#ISAR_APT_ALWAYS_REBUILD_ON_CHANGE ?= "1"/g' conf/local.conf
+    if bitbake $BB_ARGS $REPRO_TARGETS_SET; then
+        echo "isar-apt reuse: PASSED"
+    else
+        echo "isar-apt reuse: KFAIL"
+    fi
+    while [ -e bitbake.sock ]; do sleep 1; done
     # Cleanup and disable use of unsigned cached base repository
     sudo rm -rf tmp
+    sed -i -e 's/^#ISAR_APT_ALWAYS_REBUILD_ON_CHANGE ?= "1"/ISAR_APT_ALWAYS_REBUILD_ON_CHANGE ?= "1"/g' conf/local.conf
     sed -i -e 's/ISAR_USE_CACHED_BASE_REPO ?= "1"/#ISAR_USE_CACHED_BASE_REPO ?= "1"/g' conf/local.conf
     sed -i -e 's/^BB_NO_NETWORK/#BB_NO_NETWORK/g' conf/local.conf
 fi
-- 
2.20.1


  parent reply	other threads:[~2021-09-02  9:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-02  9:58 [RFC 0/4] PoC for isar-apt repo reusing Uladzimir Bely
2021-09-02  9:58 ` [RFC 1/4] meta-isar: Fix do_dpkg_build override for prebuild-deb recipe Uladzimir Bely
2021-09-02  9:58 ` [RFC 2/4] isar-apt: PoC of reusing isar-apt repo Uladzimir Bely
2021-09-02  9:58 ` Uladzimir Bely [this message]
2021-09-02  9:58 ` [RFC 4/4] doc: Add section for isar-apt reuse functionality Uladzimir Bely
2021-09-02 11:11 ` [RFC 0/4] PoC for isar-apt repo reusing Henning Schild
2021-09-03  8:43   ` Baurzhan Ismagulov
2021-09-03  5:52 ` Jan Kiszka
2021-09-03  8:18   ` Uladzimir Bely

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=20210902095817.32165-4-ubely@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox