* [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR
@ 2023-09-19 4:55 Uladzimir Bely
2023-09-19 4:55 ` [PATCH 1/2] testsuite: Allow setting SSTATE_DIR and DL_DIR from environment Uladzimir Bely
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Uladzimir Bely @ 2023-09-19 4:55 UTC (permalink / raw)
To: isar-users
Currently, testsuite uses fixed location of SSTATE_DIR and DL_DIR.
Also, sstate cache is not shared between tests in order to better
test full buildability and packages downloadability.
With these patches it now becomes possible to better control how
sstate cache is reused between tests and between test runs.
This allows users to speed up builds if it's a priority for them.
Uladzimir Bely (2):
testsuite: Allow setting SSTATE_DIR and DL_DIR from environment
testsuite: Allow to enable sstate globally
scripts/ci_build.sh | 6 +++++-
testsuite/cibuilder.py | 7 +++++++
2 files changed, 12 insertions(+), 1 deletion(-)
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] testsuite: Allow setting SSTATE_DIR and DL_DIR from environment
2023-09-19 4:55 [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR Uladzimir Bely
@ 2023-09-19 4:55 ` Uladzimir Bely
2023-09-19 4:55 ` [PATCH 2/2] testsuite: Allow to enable sstate globally Uladzimir Bely
2023-09-22 4:34 ` [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: Uladzimir Bely @ 2023-09-19 4:55 UTC (permalink / raw)
To: isar-users
If the test doesn't use custom value of `sstate_dir` and `dl_dir` in
it's `configure` function, first try to set them to SSTATE_DIR and
DL_DIR values taken from the environment.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
testsuite/cibuilder.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 9c9f5a03..d62e2b73 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -80,8 +80,12 @@ class CIBuilder(Test):
quiet = bool(int(self.params.get('quiet', default=1)))
# set those to "" to not set dir value but use system default
+ if dl_dir is None:
+ dl_dir = os.getenv('DL_DIR')
if dl_dir is None:
dl_dir = os.path.join(isar_root, 'downloads')
+ if sstate_dir is None:
+ sstate_dir = os.getenv('SSTATE_DIR')
if sstate_dir is None:
sstate_dir = os.path.join(isar_root, 'sstate-cache')
if ccache_dir is None:
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] testsuite: Allow to enable sstate globally
2023-09-19 4:55 [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR Uladzimir Bely
2023-09-19 4:55 ` [PATCH 1/2] testsuite: Allow setting SSTATE_DIR and DL_DIR from environment Uladzimir Bely
@ 2023-09-19 4:55 ` Uladzimir Bely
2023-09-22 4:34 ` [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: Uladzimir Bely @ 2023-09-19 4:55 UTC (permalink / raw)
To: isar-users
By default, sstate cache is populated only, but not used during
the build (since `--no-setscene` bitbake param is passed by default).
Add `-S` (`--sstate`) option to ci_build.sh script in order to change
the default behaviour and allow sharing sstate cache between tests.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
scripts/ci_build.sh | 6 +++++-
testsuite/cibuilder.py | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 2fa5cccd..51ed3920 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -78,6 +78,10 @@ do
TAGS="$2"
shift
;;
+ -S|--sstate)
+ SSTATE="-p sstate=$2"
+ shift
+ ;;
-f|--fast)
# Start build for the reduced set of configurations
FAST="1"
@@ -143,4 +147,4 @@ set -x
avocado ${VERBOSE} run "${TESTSUITE_DIR}/citest.py" \
-t "${TAGS}" --max-parallel-tasks=1 --disable-sysinfo \
- ${TIMEOUT}
+ ${SSTATE} ${TIMEOUT}
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index d62e2b73..1ff77332 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -79,6 +79,9 @@ class CIBuilder(Test):
# get parameters from avocado cmdline
quiet = bool(int(self.params.get('quiet', default=1)))
+ if not sstate:
+ sstate = bool(int(self.params.get('sstate', default=0)))
+
# set those to "" to not set dir value but use system default
if dl_dir is None:
dl_dir = os.getenv('DL_DIR')
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR
2023-09-19 4:55 [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR Uladzimir Bely
2023-09-19 4:55 ` [PATCH 1/2] testsuite: Allow setting SSTATE_DIR and DL_DIR from environment Uladzimir Bely
2023-09-19 4:55 ` [PATCH 2/2] testsuite: Allow to enable sstate globally Uladzimir Bely
@ 2023-09-22 4:34 ` Uladzimir Bely
2 siblings, 0 replies; 4+ messages in thread
From: Uladzimir Bely @ 2023-09-22 4:34 UTC (permalink / raw)
To: isar-users
On Tue, 2023-09-19 at 06:55 +0200, Uladzimir Bely wrote:
> Currently, testsuite uses fixed location of SSTATE_DIR and DL_DIR.
> Also, sstate cache is not shared between tests in order to better
> test full buildability and packages downloadability.
>
> With these patches it now becomes possible to better control how
> sstate cache is reused between tests and between test runs.
>
> This allows users to speed up builds if it's a priority for them.
>
> Uladzimir Bely (2):
> testsuite: Allow setting SSTATE_DIR and DL_DIR from environment
> testsuite: Allow to enable sstate globally
>
> scripts/ci_build.sh | 6 +++++-
> testsuite/cibuilder.py | 7 +++++++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> --
> 2.20.1
>
Applied to next.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-22 4:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 4:55 [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR Uladzimir Bely
2023-09-19 4:55 ` [PATCH 1/2] testsuite: Allow setting SSTATE_DIR and DL_DIR from environment Uladzimir Bely
2023-09-19 4:55 ` [PATCH 2/2] testsuite: Allow to enable sstate globally Uladzimir Bely
2023-09-22 4:34 ` [PATCH 0/2] testsuite: Add control on SSTATE_DIR and DL_DIR Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox