public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH v10 17/17] ci_build: Install Avocado if needed
Date: Thu, 12 Aug 2021 17:58:58 +0200	[thread overview]
Message-ID: <20210812175858.4264d095@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20210730082739.15042-18-amikan@ilbers.de>

Am Fri, 30 Jul 2021 11:27:39 +0300
schrieb Anton Mikanovich <amikan@ilbers.de>:

> To keep compatibility will the build systems without avocado-framework
> preinstalled add the code to install it from debian-isar repo.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  scripts/ci_build.sh | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
> index ffe50c6..a6a4b95 100755
> --- a/scripts/ci_build.sh
> +++ b/scripts/ci_build.sh
> @@ -28,6 +28,23 @@ for prog in ${DEPENDENCIES} ; do
>      fi
>  done
>  
> +# Install Avocado if needed
> +if [ ! -x "$(which avocado)" ] ; then
> +    set +e
> +    APT_LIST="/etc/apt/sources.list.d"
> +    ISAR_REPO="deb
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdeb.isar-build.org%2Fdebian-isar&amp;data=04%7C01%7Cde173c00-e982-4fda-8644-47edf4671d63%40ad011.siemens.com%7Caf72bf4e5ccc4f56a51408d95333f5de%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637632305320761070%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=4CxE70HE969aU649GEQhzxXm9YT4qQm%2FBcOo5r0uXqQ%3D&amp;reserved=0
> buster-isar main"
> +
> ISAR_KEY="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdeb.isar-build.org%2Fdebian-isar.key&amp;data=04%7C01%7Cde173c00-e982-4fda-8644-47edf4671d63%40ad011.siemens.com%7Caf72bf4e5ccc4f56a51408d95333f5de%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637632305320761070%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=DDNiBFCFIkCmXAD%2BAhNe%2F2PIj9VeVrFOkEGvdZJq8GE%3D&amp;reserved=0"
> +    sudo -s <<EOSUDO

I do not like this. The package should be mainlined into debian and
until that day maybe be installed with pip inside a venv. And i want
more than "buster". This is what i came up with

+sudo apt-get update -qq
+sudo apt-get install -y virtualenv
+
+rm -rf /tmp/venv
+virtualenv --python python3 /tmp/venv
+source /tmp/venv/bin/activate
+pip install subprocess32 avocado-framework-plugin-varianter-yaml-to-mux

> +    mkdir -p $APT_LIST
> +    echo "$ISAR_REPO" > $APT_LIST/isar.list
> +    apt-key adv --fetch-keys $ISAR_KEY
> +    apt update
> +    yes | apt install avocado

apt must not be used in scripts ... and it tells you about it.

Henning

> +EOSUDO
> +    echo "Installed Avocado-framework"
> +    set -e
> +fi
> +
>  show_help() {
>      echo "This script builds the default Isar images."
>      echo


  reply	other threads:[~2021-08-12 15:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30  8:27 [PATCH v10 00/17] Update Avocado testsuite Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 01/17] start_vm.py: Fix target name handling Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 02/17] start_vm.py: Add output and PID file vm_start.py options Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 03/17] start_vm.py: Add MIPS support Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 04/17] start_vm.py: Fix ubuntu image name Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 05/17] vm_boot_test: Fix log file path in vm_boot_test Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 06/17] vm_boot_test: Remove external varianter Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 07/17] vm_boot_test: Improve QEMU images checking Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 08/17] build_test: Refactoring build tests cases Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 09/17] testsuite: Add Python generations for testsuite in gitignore Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 10/17] testsuite: Fix test suite prepare guide Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 11/17] gitlab-ci: Add Avocado build artifacts Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 12/17] gitlab-ci: Add debug flag Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 13/17] vm_boot_test: Add automatic bitbake init Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 14/17] build_test: Protect ubuntu target with KFAIL Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 15/17] ci_build: Migrate to Avocado Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 16/17] vm_smoke_test: " Anton Mikanovich
2021-07-30  8:27 ` [PATCH v10 17/17] ci_build: Install Avocado if needed Anton Mikanovich
2021-08-12 15:58   ` Henning Schild [this message]
2021-09-16 14:11     ` Baurzhan Ismagulov
2021-08-12 16:13 ` [PATCH v10 00/17] Update Avocado testsuite Henning Schild
2021-08-12 16:19 ` Henning Schild

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=20210812175858.4264d095@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=amikan@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