From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sony.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=S1; bh=3WqQF9ltkYSwmCjc+Sh/04vBHBiYEJ9Uh4un3vvidZ8=; b=hHTz+Kj5ZL18SDtHdH54yAoEzcLzWotrM6GXWhssM0QmOgf4NW9VyYI65NNN0Q6YvnkY /O8ZcPMh1828Ya0JDPTlUmgIE2DbW7g2RHl8hlqxSqaEk32CT5JTPsqP0f/O63XJA/7M 2DrfGBBa4W78aop7KpOrTLYfPOjY6I/nQ9j1yT1tuozkbWpaeBuv5JZ4NnoBVPsKdUsq A4PYHeQpxqTscLw0Fr+GUwCJcoq9fmRCHYXODbJOmnolDWZFf5N7SQNOJNp5zHO+9pD7 icBNhYSDuu5lf91cGMrBZGaYvEg7KH00tzEJ4dO9BBmbhM6x6MQmU6NDAYk8IjQKR29l 4g== From: Date: Wed, 16 Jun 2021 17:47:59 +0000 Message-ID: References: <20210604134356.1607-1-venkata.pyla@toshiba-tsip.com> In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Fuego] Use common script to install fuego on host or docker system List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Venkata.Pyla@toshiba-tsip.com, tbird20d@yahoo.com Cc: fuego@lists.linuxfoundation.org Venkata, Did you have any responses or comments on my other feedback for the patch? -- Tim > -----Original Message----- > From: Venkata.Pyla@toshiba-tsip.com >=20 > Hello Tim, >=20 > I sent patch based on the master branch of this repository https://bitbuc= ket.org/fuegotest/fuego/src/master/ > And the previous commit id was "3c813c717f1ebd7dc279ecdb0f288e4f9d30d6d7"= . >=20 > Also created a PR (https://bitbucket.org/fuegotest/fuego/pull-requests/4)= to visualize the changes. >=20 > Please let me know if I need to send another patch with any specific bran= ch or version? >=20 >=20 > Thanks, > Venkata. > -----Original Message----- > From: Tim.Bird@sony.com > Sent: 15 June 2021 05:39 > To: pyla venkata(=1B$B#T#S#I#P=1B(B) ; tbi= rd20d@yahoo.com > Cc: fuego@lists.linuxfoundation.org; sangorrin daniel(=1B$B%5%s%4%j%s=1B(= B =1B$B%@%K%(%k=1B(B =1B$B""#S#W#C"~#A#C#T=1B(B) > Subject: RE: [Fuego] Use common script to install fuego on host or docker= system >=20 > Please see comments inline below. >=20 > I tried to apply this patch from the e-mail list using 'git am', but got = a failure. > That made it a hard to experiment with and view the changes in > context. >=20 > What version of the code is this patch based on? >=20 > > -----Original Message----- > > From: venkata.pyla@toshiba-tsip.com > > Subject: [Fuego] Use common script to install fuego on host or docker s= ystem > > > > From: venkata pyla > > > > Modified the install scripts to use common scripts for both types of > > installation, this way it will help to make sure both the environments > > are same and if any future modification will have single place of chan= ge. > > > > Now, for installing fuego on docker system the 'install.sh' script wil= l > > use common script in Dockefile to install fuego related stuff. > > > > sameway for installing fuego on host system it can use the same common > > script to install fuego related stuff. > > > > Below are the common scripts that are used in both the installation ty= pes > > for each debian distribution > > * install-stretch.sh > > * install-buster.sh > > > > so finally, > > To install fuego on docker system use the below script with options > > $ ./install.sh image_name > > e.g: ./install.sh debian_stretch 8090 debian stretch > > or > > ./install.sh debian_buster 8090 debian buster > > or > > ./install.sh --nojenkins debian_buster_nojenkins 8090 debian buster > This is a bit wordy, but OK. >=20 > If we don't support any other distributions besides Debian at the moment, > then I'm not sure we need the distribution argument. Do you have any > non-debian distribution install scripts ready to submit soon? >=20 > I'm not sure I follow calling the Debian release name the "". >=20 > > > > To install fuego on host system use the below script with options > > $ ./install-fuego.sh <-d distribution> <-s suite> <-p port> > "suite" seems like an odd name. Should this be distro "version" or "rele= ase"? >=20 > > e.g: ./install-fuego.sh -d debian -s stretch -p 8090 > > or > > ./install-fuego.sh -d debian -s buster -p 8090 > > or > > ./install-fuego.sh -d debian -s buster -p 8090 --nojenkins > > > > Signed-off-by: venkata pyla > > --- > > Dockerfile | 303 ++--------------- > > Dockerfile.nojenkins | 151 --------- > > README | 29 +- > > entrypoint.sh | 7 + > > fuego-host-scripts/docker-build-image.sh | 11 +- > > install-buster.sh | 294 ++++++++++++++++ > > install-debian.sh | 410 ++++++++++++++--------- > > install-fuego.sh | 109 ++++++ > > install-stretch.sh | 288 ++++++++++++++++ >=20 > Is install-debian.sh the common parts for a Debian installation, with > buster and stretch having the parts that are unique to each of > those distros respectively? If we're going to refactor this, I > want to eliminate any duplication, so that package names are > not used in multiple places. This has been a headache to > maintain. >=20 > It appears there is lots of duplication between install-buster.sh and > install-stretch.sh. Can we possible put this duplication into an > "install-debian-common.sh", and reserve install-buster.sh and > install-stretch.sh for only the parts unique to those distros? >=20 > > install.sh | 12 +- > > uninstall-fuego.sh | 47 +++ >=20 > Ooo - I like the sound of this uninstall script. >=20 > > 11 files changed, 1057 insertions(+), 604 deletions(-) > > delete mode 100644 Dockerfile.nojenkins > > create mode 100755 entrypoint.sh > > create mode 100755 install-buster.sh > > create mode 100755 install-fuego.sh > > create mode 100755 install-stretch.sh > > create mode 100644 uninstall-fuego.sh > > >=20 >=20 > > diff --git a/Dockerfile b/Dockerfile > > index 7f63798..ac57cb2 100644 > > --- a/Dockerfile > > +++ b/Dockerfile > > @@ -2,9 +2,11 @@ > > # WARNING: this Dockerfile assumes that the container will be created = with > > # several bind mounts (see docker-create-container.sh) > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# FIXTHIS: build this as an extension of the nonjenkins image > > > > -FROM debian:stretch-slim > > +ARG SUITE=3Dstretch > > +ARG DIST=3Ddebian > > + > > +FROM ${DIST}:${SUITE}-slim > > MAINTAINER tim.bird@sony.com > > > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > @@ -16,299 +18,32 @@ ENV http_proxy ${HTTP_PROXY} > > ENV https_proxy ${HTTP_PROXY} > > > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Prepare basic image > > +# Install fuego with the script > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > > > -ARG DEBIAN_FRONTEND=3Dnoninteractive > > - > > -WORKDIR / > > -RUN echo deb http://deb.debian.org/debian stretch main non-free > /etc= /apt/sources.list > > -RUN echo deb http://security.debian.org/debian-security stretch/update= s main >> /etc/apt/sources.list > > -RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_P= ROXY'";' > /etc/apt/apt.conf.d/80proxy; fi > > - > > -# Fuego python dependencies > > -# - python-lxml: ftc, loggen > > -# - python-simplejson: ftc > > -# - python-yaml: ftc > > -# - python-openpyxl: ftc (also LTP) > > -# - python-requests: ftc (also fuego_release_test) > > -# - python-reportlab: ftc > > -# - python-parsedatetime: ftc > > -# - python-pexpect: ssh_exec (part of ttc) > > -# - python-pip: to install filelock, flake8 > > -# - filelock: parser > > -RUN mkdir -p /usr/share/man/man1 > > -RUN apt-get update -q=3D2 && apt-get -q=3D2 -V --no-install-recommends= install \ > > - python-lxml python-simplejson python-yaml python-openpyxl \ > > - python-requests python-reportlab python-parsedatetime \ > > - python-pexpect python-pip python-setuptools python-wheel > > -RUN pip install filelock > > - > > -# Fuego command dependencies > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - git sshpass openssh-client sudo net-tools wget curl lava-tool \ > > - bash-completion iproute2 > > - > > -# Default SDK for testing locally or on an x86 board > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - build-essential cmake bison flex automake kmod libtool \ > > - libelf-dev libssl-dev libsdl1.2-dev libcairo2-dev libxmu-dev \ > > - libxmuu-dev libglib2.0-dev libaio-dev pkg-config rsync u-boot-tools > > - > > -# Default test host dependencies > > -# - iperf iperf3 netperf: used as servers on the host > > -# - bzip2 bc: used for local tests by Functional.bzip2/bc > > -# - python-matplotlib: Benchmark.iperf3 parser > > -# - python-xmltodict: AGL tests > > -# - flake8: Functional.fuego_lint > > -# - netpipe-tcp - used by Benchmark.netpipe (provides the netpipe serv= er) > > -# - iputils-ping - for /bin/ping command, used by some tests > > -# FIXTHIS: install dependencies dynamically on the tests that need the= m > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - iperf iperf3 netperf bzip2 bc python-matplotlib python-xmltodict \ > > - netpipe-tcp iputils-ping > > -RUN pip install flake8 > > - > > -# miscelaneous packages: > > -# python-serial - used by serio > > -# diffstat and vim - used by Tim > > -# time - useful for timing command duration > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - python-serial \ > > - diffstat \ > > - vim \ > > - time > > - > > -# install packages used by NuttX SDK > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - genromfs > > - > > -# FIXTHIS: determine if these tools are really necessary > > -#RUN apt-get -q=3D2 -V --no-install-recommends install \ > > -# apt-utils python-paramiko \ > > -# xmlstarlet rsync \ > > -# inotify-tools gettext netpipe-tcp \ > > -# at minicom lzop bsdmainutils \ > > -# mc netcat openssh-server > > - > > -# bsdmainutils provides hexdump, which is needed for netperf test > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - bsdmainutils > > - > > -RUN /bin/bash -c 'echo "dash dash/sh boolean false" | debconf-set-sele= ctions ; dpkg-reconfigure dash' > > -RUN if [ -n "$HTTP_PROXY" ]; then echo "use_proxy =3D on" >> /etc/wget= rc; fi > > -RUN if [ -n "$HTTP_PROXY" ]; then echo -e "http_proxy=3D$HTTP_PROXY\nh= ttps_proxy=3D$HTTP_PROXY" >> /etc/environment; fi > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Install Jenkins with the same UID/GID as the host user > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +RUN mkdir /fuego > > +COPY . /fuego/ > > +WORKDIR /fuego > > > > -ARG user=3Djenkins > > -ARG group=3Djenkins > > -ARG uid=3D1000 > > -ARG gid=3D${uid} > > ARG JENKINS_PORT=3D8090 > > -# see https://updates.jenkins.io/download/war/ for latest Jenkins vers= ions > > -#ARG JENKINS_VERSION=3D2.164.2 > > -#ARG JENKINS_SHA=3D4536f43f61b1fca6c58bd91040fa09304eea96ab > > -#ARG JENKINS_VERSION=3D2.235.3 > > -#ARG JENKINS_SHA=3D89a37ed1b3c8c14ff94cc66c3f2254f281b60794 > > -ARG JENKINS_VERSION=3D2.249.3 > > -ARG JENKINS_SHA=3D534014c007edbb533a1833fe6f2dc115faf3faa2 > > - > > -ARG JENKINS_URL=3Dhttps://pkg.jenkins.io/debian-stable/binary/jenkins_= ${JENKINS_VERSION}_all.deb > > -ARG JENKINS_UC=3Dhttps://updates.jenkins.io > > -ARG REF=3D/var/lib/jenkins/plugins > > +ARG NO_JENKINS=3D > > +ARG SUITE=3Dstretch > > +ARG DIST=3Ddebian > > +ARG uid=3D > > +ARG gid=3D > > ENV JENKINS_HOME=3D/var/lib/jenkins > > ENV JENKINS_PORT=3D$JENKINS_PORT > > +RUN ./install-$DIST.sh -s $SUITE -p $JENKINS_PORT -u $uid -g $gid $NO_= JENKINS >=20 > One question about this overall approach. Does this retain the ability t= o cache > operations, so that if something goes wrong with an install, you don't ha= ve to > start over from scratch. When building with docker, with multiple steps,= it > caches the image at each step. When rebuilding, or when an error occurs, > this can save a lot of time. It also can introduce subtle bugs, but that= 's > a separate issue. >=20 > This setup seems like it performs the bulk of the install as a single doc= ker > step, is that right? >=20 > > -# Jenkins dependencies > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - default-jdk daemon psmisc adduser procps unzip > > -RUN pip install python-jenkins=3D=3D1.4.0 > > - > > -RUN echo -e "JENKINS_PORT=3D$JENKINS_PORT" >> /etc/environment > > -RUN getent group ${gid} >/dev/null || groupadd -g ${gid} ${group} > > -RUN useradd -l -m -d "${JENKINS_HOME}" -u ${uid} -g ${gid} -G sudo -s = /bin/bash ${user} > > -RUN wget -nv ${JENKINS_URL} > > -RUN echo "${JENKINS_SHA} jenkins_${JENKINS_VERSION}_all.deb" | sha1sum= -c - > > -# allow Jenkins to start and install plugins, as part of dpkg installa= tion > > -RUN printf "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d > > -RUN dpkg -i jenkins_${JENKINS_VERSION}_all.deb > > -RUN rm jenkins_${JENKINS_VERSION}_all.deb > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# get ttc script and helpers > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -RUN git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc > > -RUN /usr/local/src/ttc/install.sh /usr/local/bin > > -# as of ttc version 2.0.2, this should not be needed > > -#RUN perl -p -i -e "s#config_dir =3D \"/etc\"#config_dir =3D \"/fuego-= ro/conf\"#" /usr/local/bin/ttc > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# get ebf script and helpers > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -RUN apt-get -q=3D2 -V --no-install-recommends install jq > > -RUN git clone https://github.com/TimesysGit/board-farm-rest-api.git /u= sr/local/src/board-farm-rest-api ; \ > > - cp /usr/local/src/board-farm-rest-api/cli/ebf /usr/local/bin/ebf ; \ > > - chmod a+x /usr/local/bin/ebf > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Serial Config > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN git clone https://github.com/frowand/serio.git /usr/local/src/seri= o > > -COPY frontend-install/0001-Fix-host-parsing-for-serial-device-with-in-= name.patch \ > > - frontend-install/0002-Output-data-from-port-during-command-execution= .patch \ > > - /tmp/ > > -RUN /bin/bash -c 'patch -d /usr/local/src/serio -p1 > - patch -d /usr/local/src/serio -p1 > - chown -R jenkins /usr/local/src/serio ; \ > > - cp /usr/local/src/serio/serio /usr/local/bin/ ; \ > > - ln -s /usr/local/bin/serio /usr/local/bin/sercp ; \ > > - ln -s /usr/local/bin/serio /usr/local/bin/sersh' > > - > > -RUN /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /= usr/local/src/serlogin ; chown -R jenkins /usr/local/src/serlogin ; > cp > > /usr/local/src/serlogin/serlogin /usr/local/bin' > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# fserver > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN /bin/bash -c 'git clone https://github.com/tbird20d/fserver.git /u= sr/local/lib/fserver ; \ > > - ln -s /usr/local/lib/fserver/start_local_bg_server /usr/local/bin/st= art_local_bg_server' > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Jenkins post installation > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN source /etc/default/jenkins && \ > > - JENKINS_ARGS=3D"$JENKINS_ARGS --prefix=3D/fuego" && \ > > - sed -i -e "s#JENKINS_ARGS.*#JENKINS_ARGS\=3D\"${JENKINS_ARGS}\"#g" /e= tc/default/jenkins > > - > > -RUN source /etc/default/jenkins && \ > > - JAVA_ARGS=3D"$JAVA_ARGS -Djenkins.install.runSetupWizard=3Dfalse - > > Dhudson.model.DirectoryBrowserSupport.allowSymlinkEscape=3Dtrue" && \ > > - if [ -n "$HTTP_PROXY" ]; then \ > > - PROXYSERVER=3D$(echo $http_proxy | sed -E 's/^http://' | sed -E 's/\= ///g' | sed -E 's/(.*):(.*)/\1/') && \ > > - PROXYPORT=3D$(echo $http_proxy | sed -E 's/^http://' | sed -E 's/\//= /g' | sed -E 's/(.*):(.*)/\2/') && \ > > - JAVA_ARGS=3D"$JAVA_ARGS -Dhttp.proxyHost=3D"${PROXYSERVER}" -Dhttp.p= roxyPort=3D"${PROXYPORT}" - > > Dhttps.proxyHost=3D"${PROXYSERVER}" -Dhttps.proxyPort=3D"${PROXYPORT}; = \ > > - fi && \ > > - sed -i -e "s#^JAVA_ARGS.*#JAVA_ARGS\=3D\"${JAVA_ARGS}\"#g" /etc/defau= lt/jenkins; > > - > > -RUN sed -i -e "s#8080#$JENKINS_PORT#g" /etc/default/jenkins > > - > > -# set up Jenkins plugins > > -COPY frontend-install/install-plugins.sh \ > > - frontend-install/jenkins-support \ > > - frontend-install/clitest \ > > - /usr/local/bin/ > > - > > -# start Jenkins onces to initialize directories? > > -RUN service jenkins start && \ > > - sleep 30 && \ > > - service jenkins stop > > - > > -# install plugins - these versions are for Jenkins version 2.164.2 > > -# Explicitly install script-security v1.68, otherwise > > -# v1.74 will automatically be installed as a dependency of > > -# the junit plugin. Make sure to install before junit plugin. > > -# Explicitly install junit:1.27 > > - > > -# install other plugins from Jenkins update center > > -# NOTE: not sure all of these are needed, but keep list > > -# as compatible as possible with 1.2.1 release for now > > -# Do NOT change the order of the plugins, unless you know what > > -# you are doing. Otherwise, the install-plugins.sh script will > > -# install the wrong versions of other plugins based on dependency > > -# information in the plugin files. > > - > > -#RUN /usr/local/bin/install-plugins.sh \ > > -# script-security:1.68 \ > > -# structs:1.20 \ > > -# workflow-step-api:2.22 \ > > -# workflow-api:2.40 \ > > -# junit:1.27 \ > > -# scm-api:2.6.3 \ > > -# ant:1.9 \ > > -# antisamy-markup-formatter:1.5 \ > > -# bouncycastle-api:2.17 \ > > -# command-launcher:1.3 \ > > -# description-setter:1.10 \ > > -# display-url-api:2.3.1 \ > > -# external-monitor-job:1.7 \ > > -# greenballs:1.15 \ > > -# icon-shim:2.0.3 \ > > -# javadoc:1.5 \ > > -# jdk-tool:1.2 \ > > -# ldap:1.20 \ > > -# mailer:1.23 \ > > -# matrix-auth:2.3 \ > > -# matrix-project:1.14 \ > > -# pam-auth:1.5 \ > > -# pegdown-formatter:1.3 \ > > -# windows-slaves:1.4 > > - > > -# install plugins for latest LTS Jenkins (currently 2.249.3) > > -RUN /usr/local/bin/install-plugins.sh \ > > - script-security \ > > - structs \ > > - workflow-step-api \ > > - workflow-api \ > > - junit \ > > - scm-api \ > > - ant \ > > - antisamy-markup-formatter \ > > - bouncycastle-api \ > > - command-launcher \ > > - description-setter \ > > - display-url-api \ > > - external-monitor-job \ > > - greenballs \ > > - icon-shim \ > > - javadoc \ > > - jdk-tool \ > > - mailer \ > > - matrix-auth \ > > - matrix-project \ > > - pam-auth \ > > - pegdown-formatter \ > > - windows-slaves > > +COPY entrypoint.sh /usr/bin/ > > > > -COPY frontend-install/plugins/flot-plotter-plugin/flot.hpi $JENKINS_HO= ME/plugins/flot.jpi > > - > > -# jenkins should automatically unzip any plugins in the plugin dir > > -# make a symlink for mod.js well after flot is installed > > -RUN service jenkins start && sleep 30 && \ > > - rm $JENKINS_HOME/plugins/flot/flot/mod.js && \ > > - ln -s /fuego-core/scripts/mod.js $JENKINS_HOME/plugins/flot/flot/m= od.js > > - > > -RUN ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs > > -COPY docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf > > - > > -COPY frontend-install/config.xml $JENKINS_HOME/config.xml > > -COPY frontend-install/jenkins.model.JenkinsLocationConfiguration.xml > $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml > > -RUN sed -i -e "s#8080#$JENKINS_PORT#g" $JENKINS_HOME/jenkins.model.Jen= kinsLocationConfiguration.xml > > - > > -RUN chown -R jenkins:jenkins $JENKINS_HOME/ > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# ftc post installation > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN ln -s /fuego-core/scripts/ftc /usr/local/bin/ > > -COPY fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc > > -RUN echo ". /etc/bash_completion" >> /root/.bashrc > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Lava > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN ln -s /fuego-ro/scripts/fuego-lava-target-setup /usr/local/bin > > -RUN ln -s /fuego-ro/scripts/fuego-lava-target-teardown /usr/local/bin > > +# Delete the files that are copied for installation > > +RUN rm -rf /fuego >=20 > I'm not sure what this is doing. It looks scary. Please explain. >=20 > > +WORKDIR / > > > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > # Setup startup command > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > # FIXTHIS: when running multiple Fuego containers, or if the host is a= lready > > # running the netperf server, netperf will complain because the port = is taken > > -ENTRYPOINT service jenkins start && service netperf start && iperf3 -V= -s -D -f M && /bin/bash > > +ENTRYPOINT entrypoint.sh $NO_JENKINS && /bin/bash >=20 > Isolating this to a separate script is nice! >=20 > > diff --git a/Dockerfile.nojenkins b/Dockerfile.nojenkins > > deleted file mode 100644 > > index 56de98a..0000000 > > --- a/Dockerfile.nojenkins > > +++ /dev/null >=20 > Getting rid of this separate Dockerfile is nice. >=20 > > @@ -1,151 +0,0 @@ > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# WARNING: this Dockerfile assumes that the container will be created = with > > -# several bind mounts (see docker-create-container.sh) > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Usage: > > -# host$ vi fuego-ro/conf/fuego.conf > > -# jenkins_enabled=3D0 > > -# host$ ./fuego-host-scripts/docker-build-image.sh fuego-nojenkins 809= 0 Dockerfile.nojenkins > > -# host$ ./fuego-host-scripts/docker-create-container.sh fuego-nojenkin= s fuego-nojenkins-container > > -# host$ ./fuego-host-scripts/docker-start-container.sh fuego-nojenkins= -container > > -# docker# ftc list-boards > > -# docker, bbb, ... > > -# docker# ftc list-tests > > -# Functional.hello_world, ... > > -# docker# ftc run-test -b docker -t Functional.hello_world > > -# log_compare: pattern 'SUCCESS' found 1 times (expected greater or = equal than 1) > > - > > -FROM debian:stretch-slim > > -MAINTAINER tim.bird@sony.com > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Proxy variables > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -ARG HTTP_PROXY > > -ENV http_proxy ${HTTP_PROXY} > > -ENV https_proxy ${HTTP_PROXY} > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Prepare basic image > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -ARG DEBIAN_FRONTEND=3Dnoninteractive > > - > > -WORKDIR / > > -RUN echo deb http://deb.debian.org/debian stretch main non-free > /etc= /apt/sources.list > > -RUN echo deb http://security.debian.org/debian-security stretch/update= s main >> /etc/apt/sources.list > > -RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_P= ROXY'";' > /etc/apt/apt.conf.d/80proxy; fi > > - > > -# Fuego python dependencies > > -# - python-lxml: ftc, loggen > > -# - python-simplejson: ftc > > -# - python-yaml: ftc > > -# - python-openpyxl: ftc (also LTP) > > -# - python-requests: ftc (also fuego_release_test) > > -# - python-reportlab: ftc > > -# - python-parsedatetime: ftc > > -# - python-pexpect: ssh_exec (part of ttc) > > -# - python-pip: to install filelock, flake8 > > -# - filelock: parser > > -RUN mkdir -p /usr/share/man/man1 > > -RUN apt-get update -q=3D2 && apt-get -q=3D2 -V --no-install-recommends= install \ > > - python-lxml python-simplejson python-yaml python-openpyxl \ > > - python-requests python-reportlab python-parsedatetime \ > > - python-pexpect python-pip python-setuptools python-wheel > > -RUN pip install filelock > > - > > -# Fuego command dependencies > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - git sshpass openssh-client sudo net-tools wget curl lava-tool \ > > - bash-completion iproute2 > > - > > -# Default SDK for testing locally or on an x86 board > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - build-essential cmake bison flex automake kmod libtool \ > > - libelf-dev libssl-dev libsdl1.2-dev libcairo2-dev libxmu-dev \ > > - libxmuu-dev libglib2.0-dev libaio-dev pkg-config rsync u-boot-tools > > - > > -# Default test host dependencies > > -# - iperf iperf3 netperf: used as servers on the host > > -# - bzip2 bc: used for local tests by Functional.bzip2/bc > > -# - python-matplotlib: Benchmark.iperf3 parser > > -# - python-xmltodict: AGL tests > > -# - flake8: Functional.fuego_lint > > -# - netpipe-tcp - used by Benchmark.netpipe (provides the netpipe serv= er) > > -# - iputils-ping - for /bin/ping command, used by some tests > > -# FIXTHIS: install dependencies dynamically on the tests that need the= m > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - iperf iperf3 netperf bzip2 bc python-matplotlib python-xmltodict \ > > - netpipe-tcp iputils-ping > > -RUN pip install flake8 > > - > > -# miscelaneous packages: > > -# python-serial - used by serio > > -# diffstat and vim - used by Tim > > -# time - useful for timing command duration > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - python-serial \ > > - diffstat \ > > - vim \ > > - time > > - > > -# FIXTHIS: determine if these tools are really necessary > > -# RUN apt-get -q=3D2 -V --no-install-recommends install \ > > -# apt-utils python-paramiko \ > > -# xmlstarlet rsync \ > > -# inotify-tools gettext netpipe-tcp \ > > -# at minicom lzop bsdmainutils \ > > -# mc netcat openssh-server > > - > > -# bsdmainutils provides hexdump, which is needed for netperf test > > -RUN apt-get -q=3D2 -V --no-install-recommends install \ > > - bsdmainutils > > - > > -RUN /bin/bash -c 'echo "dash dash/sh boolean false" | debconf-set-sele= ctions ; dpkg-reconfigure dash' > > -RUN if [ -n "$HTTP_PROXY" ]; then echo "use_proxy =3D on" >> /etc/wget= rc; fi > > -RUN if [ -n "$HTTP_PROXY" ]; then echo -e "http_proxy=3D$HTTP_PROXY\nh= ttps_proxy=3D$HTTP_PROXY" >> /etc/environment; fi > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# get ttc script and helpers > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -RUN git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc > > -RUN /usr/local/src/ttc/install.sh /usr/local/bin > > -# as of ttc version 2.0.2, this should not be needed > > -#RUN perl -p -i -e "s#config_dir =3D \"/etc\"#config_dir =3D \"/fuego-= ro/conf\"#" /usr/local/bin/ttc > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Serial Config > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN /bin/bash -c 'git clone https://github.com/frowand/serio.git /usr/= local/src/serio ; cp /usr/local/src/serio/serio /usr/local/bin/ ; ln -s > > /usr/local/bin/serio /usr/local/bin/sercp ; ln -s /usr/local/bin/serio = /usr/local/bin/sersh' > > - > > -RUN /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /= usr/local/src/serlogin ; cp /usr/local/src/serlogin/serlogin > > /usr/local/bin' > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# fserver > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN /bin/bash -c 'git clone https://github.com/tbird20d/fserver.git /u= sr/local/lib/fserver ; ln -s > /usr/local/lib/fserver/start_local_bg_server > > /usr/local/bin/start_local_bg_server' > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# ftc post installation > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN ln -s /fuego-core/scripts/ftc /usr/local/bin/ > > -COPY fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc > > -RUN echo ". /etc/bash_completion" >> /root/.bashrc > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Lava > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -RUN ln -s /fuego-ro/scripts/fuego-lava-target-setup /usr/local/bin > > -RUN ln -s /fuego-ro/scripts/fuego-lava-target-teardown /usr/local/bin > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Setup startup command > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > -# FIXTHIS: when running multiple Fuego containers netperf will complai= n because the port is taken > > -ENTRYPOINT service netperf start && iperf3 -V -s -D -f M && /bin/bash > > diff --git a/README b/README > > index 882d84e..ce42e1e 100644 > > --- a/README > > +++ b/README > > @@ -44,6 +44,29 @@ You can change the name of the docker image and the = port used by Jenkins > > by passing the corresponding parameters to install.sh. > > ./install.sh fuego-8082 8082 > > > > +To run fuego on different distribution versions like Debian(stretch, b= uster, etc.) > > + pass appropriate arguments to the install.sh script > > + ./install.sh >=20 > should probably be: > ./install.sh [[] [[] [ ]]] >=20 > > + > > +By default install.sh script will install fuego on Debian stretch vers= ion > > + to install fuego on Debian buster version pass below options > > + ./install.sh fuego_buster 8090 debian buster > > + > > +[Note] It is currently verified on Debian versions (stretch and buster= ), > > +and yet to provide install scripts for other distributions > > + > > +Installing Fuego to a host system > > +----------------------------------------------------------------------= --------- > > +Run install-fuego.sh to install fuego on host system, by default it as= sume the > > +host system is Debian stretch > > + ./install-fuego.sh > > + > > + to install on Debian buster version > > + ./install-fuego.sh -d debian -s buster -p 8090 > > + > > + to install without jenkins pass --nojenkins option to the script > > + ./install-fuego.sh --nojenkins > > + > > Running > > ----------------------------------------------------------------------= --------- > > To start your Fuego container, issue the following command top directo= ry: > > @@ -85,9 +108,9 @@ Updating the Jenkins version > > ----------------------------------------------------------------------= --------- > > > > Modify the version and checksum > > - $ vi Dockerfile > > - ARG JENKINS_VERSION=3D2.32.1 > > - ARG JENKINS_SHA=3D3cbe9b6d4d82c975642ea4409e21e087 > > + $ vi install-debian.sh > > + JENKINS_VERSION=3D2.32.1 > > + JENKINS_SHA=3D3cbe9b6d4d82c975642ea4409e21e087 > > > > Re-build the flot plugin > > $ sudo apt-get install maven > > diff --git a/entrypoint.sh b/entrypoint.sh > > new file mode 100755 > > index 0000000..6eac895 > > --- /dev/null > > +++ b/entrypoint.sh > > @@ -0,0 +1,7 @@ > > +#!/bin/bash > > + > > +[ "$1" !=3D "--nojenkins" ] && service jenkins start > > + > > +#TODO: netperf not present in buster, remove this condition once alter= native found > > +[ -f /etc/init.d/netperf ] && service netperf start > > +iperf3 -V -s -D -f M > > diff --git a/fuego-host-scripts/docker-build-image.sh b/fuego-host-scri= pts/docker-build-image.sh > > index 5823357..6889c47 100755 > > --- a/fuego-host-scripts/docker-build-image.sh > > +++ b/fuego-host-scripts/docker-build-image.sh > > @@ -2,9 +2,10 @@ > > # $1 - name for the docker image (default: fuego) > > # $2 - port for jenkins (default: 8090) > > # $3 - Dockerfile or Dockerfile.nojenkins > > +# $4 - Debian code name on which to install (default: stretch) > > # > > # Example: > > -# ./fuego-host-scripts/docker-build-image.sh --no-cache myfuegoimg 80= 82 Dockerfile.nojenkins > > +# ./fuego-host-scripts/docker-build-image.sh --no-cache myfuegoimg 80= 82 debian stretch --nojenkins > > # > > if [ "$1" =3D "--no-cache" ]; then > > NO_CACHE=3D--no-cache > > @@ -13,7 +14,10 @@ fi > > > > DOCKERIMAGE=3D${1:-fuego} > > JENKINS_PORT=3D${2:-8090} > > -DOCKERFILE=3D${3:-Dockerfile} > > +DISTRIBUTION=3D${3:-debian} > > +SUITE=3D${4:-stretch} > > +NO_JENKINS=3D${5:""} > > +DOCKERFILE=3D"Dockerfile" > > > > if [ "$(id -u)" =3D=3D "0" ]; then > > JENKINS_UID=3D$(id -u $SUDO_USER) > > @@ -27,4 +31,7 @@ echo "Using Port $JENKINS_PORT" > > > > sudo docker build ${NO_CACHE} -t ${DOCKERIMAGE} --build-arg HTTP_PROXY= =3D$http_proxy \ > > --build-arg uid=3D$JENKINS_UID --build-arg gid=3D$JENKINS_GID \ > > + --build-arg DIST=3D$DISTRIBUTION \ > > + --build-arg SUITE=3D$SUITE \ > > + --build-arg NO_JENKINS=3D$NO_JENKINS \ > > --build-arg JENKINS_PORT=3D$JENKINS_PORT -f $DOCKERFILE . > > diff --git a/install-buster.sh b/install-buster.sh > > new file mode 100755 > > index 0000000..f4ce65b > > --- /dev/null > > +++ b/install-buster.sh > > @@ -0,0 +1,294 @@ > > +#!/bin/bash > > +# 2019 (c) Toshiba corp. > > +# > > +# Usage: > > +# $ sudo ./install-buster.sh [--help|-h] [--nojenkins] [] > > +# > > +usage(){ > > + > > +cat < > +Usage: sudo ./install-buster.sh [--help|-h] [--nojenkins] [] > > + > > +Install fuego on the host Debian filesystem. > > + > > +options: > > + --help Show usage help > > + --nojenkins Install Fuego without Jenkins > > +HERE > > +} > > + > > +if [[ $EUID -ne 0 ]]; then > > + echo "Sorry, you need root permissions" > > + exit 1 > > +fi > > + > > +nojenkins=3D0 > > + > > +POSITIONAL=3D() > > +while [[ $# -gt 0 ]] ; do > > + case $1 in > > + --nojenkins) > > + nojenkins=3D1 > > + shift > > + ;; > > + --help | -h) > > + usage > > + exit 0 > > + ;; > > + *) > > + POSITIONAL+=3D("$1") # save argument for later > > + shift > > + esac > > +done > > +set -- "${POSITIONAL[@]}" # restore positional arguments > > + > > +port=3D${2:-8090} > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Install Fuego dependencies > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > + > > +mkdir -p /usr/share/man/man1 > > + > > +# netperf is in non-free > > +echo deb http://deb.debian.org/debian buster main non-free > /etc/apt/= sources.list > > +echo deb http://security.debian.org/debian-security buster/updates mai= n >> /etc/apt/sources.list > > + > > +apt-get update -q=3D2 > > + > > +# Fuego python dependencies > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + python-lxml python-simplejson python-yaml python-openpyxl \ > > + python-requests python-reportlab python-parsedatetime \ > > + python-pexpect python-pip python-setuptools python-wheel > > +pip install filelock > > + >=20 > Can we put this stuff that is common between install-buster.sh and instal= l-stretch.sh > into an "install-debian-common.sh"? >=20 > > +# Fuego command dependencies > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + git sshpass openssh-client sudo net-tools wget curl lava-tool \ > > + bash-completion iproute2 > > + > > +# Default SDK for testing locally or on an x86 board > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + build-essential cmake bison flex kmod automake libtool \ > > + libelf-dev libssl-dev libsdl1.2-dev libcairo2-dev libxmu-dev \ > > + libxmuu-dev libglib2.0-dev libaio-dev pkg-config rsync u-boot-tools > > + > > +# Default test host dependencies > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + iperf iperf3 bzip2 bc python-matplotlib python-xmltodict \ > > + netpipe-tcp iputils-ping > > +pip install flake8 > > + > > +# miscelaneous packages: > > +# python-serial - used by serio > > +# diffstat and vim - used by Tim > > +# time - useful for timing command duration > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + python-serial \ > > + diffstat \ > > + vim \ > > + time > > + > > +# install packages used by NuttX SDK > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + genromfs > > + > > +# bsdmainutils provides hexdump, which is needed for netperf test > > +#apt-get -q=3D2 -V --no-install-recommends install \ > > +# bsdmainutils > > + > > +echo "dash dash/sh boolean false" | debconf-set-selections > > +DEBIAN_FRONTEND=3Dnoninteractive dpkg-reconfigure dash > > + > > +# TODO: check if proxy settings can set outside docker container > > +if [ -n "$http_proxy" ]; then > > + sed -i -e 's/#use_proxy =3D on/use_proxy =3D on/g' /etc/wgetrc > > + echo -e "http_proxy=3D$http_proxy\nhttps_proxy=3D$https_proxy" = >> /etc/environment > > +fi >=20 > This doesn't seem specific to Debian (/etc/wgetrc and /etc/environment). > Should this be moved to an 'install-common.sh' script? >=20 > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Install Jenkins > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > + > > +if [ $nojenkins -eq 0 ]; then > > + #JENKINS_VERSION=3D2.164.2 > > + #JENKINS_SHA=3D4536f43f61b1fca6c58bd91040fa09304eea96ab > > + #JENKINS_VERSION=3D2.249.3 > > + #JENKINS_SHA=3D534014c007edbb533a1833fe6f2dc115faf3faa2 > > + JENKINS_VERSION=3D2.164.3 > > + JENKINS_SHA=3D27f14f0ccca207660765205317295a5c29f4dd53 > > + JENKINS_URL=3Dhttps://pkg.jenkins.io/debian-stable/binary/jenkins_${J= ENKINS_VERSION}_all.deb > > + export JENKINS_UC=3Dhttps://updates.jenkins.io > > + REF=3D/var/lib/jenkins/plugins > > + JENKINS_HOME=3D/var/lib/jenkins > > + JENKINS_PORT=3D$port > > + > > + # Jenkins dependencies > > + apt-get -q=3D2 -V --no-install-recommends install \ > > + default-jdk daemon psmisc adduser procps unzip > > + pip install python-jenkins=3D=3D1.4.0 > > + > > + echo -e "JENKINS_PORT=3D$JENKINS_PORT" >> /etc/environment > > + export JENKINS_PORT=3D$port > > + > > + groupadd jenkins > > + useradd -l -m -d "${JENKINS_HOME}" -g jenkins -G sudo -s /bin/bash je= nkins > > + > > + wget -nv ${JENKINS_URL} > > + echo "${JENKINS_SHA} jenkins_${JENKINS_VERSION}_all.deb" | sha1sum -c= - > > + > > + # allow Jenkins to start and install plugins, as part of dpkg install= ation > > + printf "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d > > + dpkg -i jenkins_${JENKINS_VERSION}_all.deb > > + rm jenkins_${JENKINS_VERSION}_all.deb > > + > > + # fix for Jenkins Java version check error > > + JAVA_VERSION_CHECK=3D"\$\(\$JAVA -version 2\>\&1 \| sed -n \';s/.* ve= rsion > > \"\\\(.*\\\)\\\.\\\(.*\\\)\\\..\*\\\..\*\".\*\/\\\1\\\2\/p;\'\)" > > + sed -i -e "s#^JAVA_VERSION=3D.*#JAVA_VERSION\=3D\"${JAVA_VERSION_CHEC= K}\"#g" /etc/init.d/jenkins > > + > > + source /etc/default/jenkins && \ > > + JENKINS_ARGS=3D"$JENKINS_ARGS --prefix=3D/fuego" && \ > > + sed -i -e "s#JENKINS_ARGS.*#JENKINS_ARGS\=3D\"${JENKINS_ARGS}\"#g" /= etc/default/jenkins > > + > > + source /etc/default/jenkins && \ > > + JAVA_ARGS=3D"$JAVA_ARGS -Djenkins.install.runSetupWizard=3Dfalse - > > Dhudson.model.DirectoryBrowserSupport.allowSymlinkEscape=3Dtrue" && \ > > + if [ -n "$http_proxy" ]; then \ > > + PROXYSERVER=3D$(echo $http_proxy | sed -E 's/^http://' | sed -E 's/= \///g' | sed -E 's/(.*):(.*)/\1/') && \ > > + PROXYPORT=3D$(echo $http_proxy | sed -E 's/^http://' | sed -E 's/\/= //g' | sed -E 's/(.*):(.*)/\2/') && \ > > + JAVA_ARGS=3D"$JAVA_ARGS -Dhttp.proxyHost=3D"${PROXYSERVER}" -Dhttp.= proxyPort=3D"${PROXYPORT}" - > > Dhttps.proxyHost=3D"${PROXYSERVER}" -Dhttps.proxyPort=3D"${PROXYPORT}; = \ > > + fi && \ > > + sed -i -e "s#^JAVA_ARGS.*#JAVA_ARGS\=3D\"${JAVA_ARGS}\"#g" /etc/defa= ult/jenkins; > > + > > + sed -i -e "s#8080#$JENKINS_PORT#g" /etc/default/Jenkins >=20 > The above looks like there's a lot of non-Debian-specific stuff interming= led with Debian-specific stuff. > I'm not sure what other distributions are intended to be supported, but w= ouldn't the user and > group manipulation be the same for those? >=20 > > + > > + # set up Jenkins plugins > > + cp frontend-install/install-plugins.sh \ > > + frontend-install/jenkins-support \ > > + frontend-install/clitest \ > > + /usr/local/bin/ > > + > > + mkdir -p $JENKINS_HOME/userContent/docs > > + cp frontend-install/config.xml $JENKINS_HOME/config.xml > > + ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs > > + cp docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf > > + cp frontend-install/jenkins.model.JenkinsLocationConfiguration.xml > > $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml > > + sed -i -e "s#8080#$JENKINS_PORT#g" $JENKINS_HOME/jenkins.model.Jenkin= sLocationConfiguration.xml > > + chown -R jenkins:jenkins $JENKINS_HOME/ > > + > > + # start and stop jenkins to pre-populate some settings > > + service jenkins start && \ > > + sleep 30 && \ > > + service jenkins stop > > + > > + # install other plugins from Jenkins update center > > + # NOTE: not sure all of these are needed, but keep list > > + # compatible with 1.2.1 release for now > > + #/usr/local/bin/install-plugins.sh \ > > + # ant:1.9 \ > > + # antisamy-markup-formatter:1.5 \ > > + # bouncycastle-api:2.17 \ > > + # command-launcher:1.3 \ > > + # description-setter:1.10 \ > > + # display-url-api:2.3.1 \ > > + # external-monitor-job:1.7 \ > > + # greenballs:1.15 \ > > + # icon-shim:2.0.3 \ > > + # javadoc:1.5 \ > > + # jdk-tool:1.2 \ > > + # junit:1.27 \ > > + # ldap:1.20 \ > > + # mailer:1.23 \ > > + # matrix-auth:2.3 \ > > + # matrix-project:1.14 \ > > + # pam-auth:1.4 \ > > + # pegdown-formatter:1.3 \ > > + # structs:1.17 \ > > + # windows-slaves:1.4 > > + > > + # install plugins for latest LTS Jenkins (currently 2.249.3) > > + /usr/local/bin/install-plugins.sh \ > > + script-security \ > > + structs \ > > + workflow-step-api \ > > + workflow-api \ > > + junit \ > > + scm-api \ > > + ant \ > > + antisamy-markup-formatter \ > > + bouncycastle-api \ > > + command-launcher \ > > + description-setter \ > > + display-url-api \ > > + external-monitor-job \ > > + greenballs \ > > + icon-shim \ > > + javadoc \ > > + jdk-tool \ > > + mailer \ > > + matrix-auth \ > > + matrix-project \ > > + pam-auth \ > > + pegdown-formatter \ > > + windows-slaves > > + > > + cp frontend-install/plugins/flot-plotter-plugin/flot.hpi $JENKINS_= HOME/plugins/flot.jpi > > + > > + # make the mod.js symlink well after flot is installed > > + service jenkins start && sleep 30 && \ > > + rm $JENKINS_HOME/plugins/flot/flot/mod.js && \ > > + ln -s /fuego-core/scripts/mod.js $JENKINS_HOME/plugins/flot/flot/mod= .js > > + > > + chown -R jenkins:jenkins $JENKINS_HOME/ > > +fi > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# get ttc script and helpers > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc > > +/usr/local/src/ttc/install.sh /usr/local/bin > > +perl -p -i -e "s#config_dir =3D \"/etc\"#config_dir =3D \"/fuego-ro/co= nf\"#" /usr/local/bin/ttc > > + > The above and following are definitely not unique to Debian, or a specifi= c version of Debian. > They should be put into an "install-common.sh" >=20 > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Serial Config > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +if [ $nojenkins -eq 0 ]; then > > + /bin/bash -c 'git clone https://github.com/frowand/serio.git /usr/loc= al/src/serio ; chown -R jenkins /usr/local/src/serio ; cp > > /usr/local/src/serio/serio /usr/local/bin/ ; ln -s /usr/local/bin/serio= /usr/local/bin/sercp ; ln -s /usr/local/bin/serio /usr/local/bin/sersh' > > + /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /usr= /local/src/serlogin ; chown -R jenkins /usr/local/src/serlogin ; > > cp /usr/local/src/serlogin/serlogin /usr/local/bin' > > +else > > + /bin/bash -c 'git clone https://github.com/frowand/serio.git /usr/loc= al/src/serio ; cp /usr/local/src/serio/serio /usr/local/bin/ ; ln - > > s /usr/local/bin/serio /usr/local/bin/sercp ; ln -s /usr/local/bin/seri= o /usr/local/bin/sersh' > > + /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /usr= /local/src/serlogin ; cp /usr/local/src/serlogin/serlogin > > /usr/local/bin' > > +fi > > +cp frontend-install/0001-Fix-host-parsing-for-serial-device-with-in-na= me.patch \ > > + frontend-install/0002-Output-data-from-port-during-command-execution= .patch \ > > + /tmp/ > > +/bin/bash -c 'patch -d /usr/local/src/serio -p1 > + patch -d /usr/local/src/serio -p1 > + > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# get ebf script and helpers > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +apt-get -q=3D2 -V --no-install-recommends install jq > > +git clone https://github.com/TimesysGit/board-farm-rest-api.git /usr/l= ocal/src/board-farm-rest-api > > +cp /usr/local/src/board-farm-rest-api/cli/ebf /usr/local/bin/ebf > > +chmod a+x /usr/local/bin/ebf > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# fserver > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +git clone https://github.com/tbird20d/fserver.git /usr/local/lib/fserv= er > > +ln -s /usr/local/lib/fserver/start_local_bg_server /usr/local/bin/star= t_local_bg_server > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# ftc post installation > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +ln -s /fuego-core/scripts/ftc /usr/local/bin/ > > +cp fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc > > +echo ". /etc/bash_completion" >> /root/.bashrc > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Lava > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +ln -s /fuego-ro/scripts/fuego-lava-target-setup /usr/local/bin > > +ln -s /fuego-ro/scripts/fuego-lava-target-teardown /usr/local/bin > > diff --git a/install-debian.sh b/install-debian.sh > > index ccca032..2d3ffd3 100755 > > --- a/install-debian.sh > > +++ b/install-debian.sh > > @@ -2,102 +2,163 @@ > > # 2019 (c) Toshiba corp. > > # > > # Usage: > > -# $ sudo ./install-debian.sh [--help|-h] [--nojenkins] [] > > +# $ sudo ./install-debian.sh [--help|-h] [-s ] [-p ] [--nojenkins] > > # > > -if [ -n "$1" ]; then > > - if [ "$1" =3D "--help" -o "$1" =3D "-h" ]; then > > - cat < > -Usage: sudo ./install-debian.sh [--help|-h] [--nojenkins] [] > > - > > -Installs fuego on the host Debian filesystem. > > - > > -options: > > - --help Show usage help > > - --nojenkins Install Fuego without Jenkins > > -HERE > > - exit 0 > > - fi > > -fi > > + > > +usage(){ > > + echo "" > > + echo "Usage: sudo ./install-debian.sh [--help|-h] [-s ] [-p ] [--nojenkins]" > > + echo "Install fuego on Debian filesystem." > > + echo "" > > + echo "options:" > > + echo " --help | -h Show usage help" > > + echo " --suite | -s Specify Debian suite" > > + echo " --port | -p Jenkins port" > > + echo " --nojenkins Install Fuego without Jenkins" > > + echo "" > > +} > > > > if [[ $EUID -ne 0 ]]; then > > echo "Sorry, you need root permissions" > > exit 1 > > fi > > > > -if [ "$1" =3D "--nojenkins" ]; then > > - nojenkins=3D1 > > +nojenkins=3D0 > > +port=3D8090 > > +suite=3Dstretch > > +user=3Djenkins > > +group=3Djenkins > > +uid=3D1000 > > +gid=3D1000 > > + > > +while [ "$1" !=3D "" ]; do > > + case $1 in > > + -s | --suite ) > > + shift > > + suite=3D$1 > > + ;; > > + -p | --port ) > > + shift > > + port=3D$1 > > + ;; > > + -u | --uid ) > > + shift > > + uid=3D$1 > > + ;; > > + -g | --gid ) > > + shift > > + gid=3D$1 > > + ;; > > + --nojenkins ) > > + nojenkins=3D1 > > + ;; > > + -h | --help ) > > + usage > > + exit 0 > > + ;; > > + * ) > > + break > > + esac > > shift > > -else > > - nojenkins=3D0 > > - port=3D${1:-8090} > > -fi > > +done > > > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > # Install Fuego dependencies > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > > > # netperf is in non-free > > -echo deb http://deb.debian.org/debian stretch main non-free > /etc/apt= /sources.list > > -echo deb http://security.debian.org/debian-security stretch/updates ma= in >> /etc/apt/sources.list > > - > > -apt-get update -q=3D2 > > +echo deb http://deb.debian.org/debian $suite main non-free > /etc/apt/= sources.list > > +echo deb http://security.debian.org/debian-security $suite/updates mai= n >> /etc/apt/sources.list > > > > # Fuego python dependencies > > -apt-get -q=3D2 -V --no-install-recommends install \ > > +# - python-lxml: ftc, loggen > > +# - python-simplejson: ftc > > +# - python-yaml: ftc > > +# - python-openpyxl: ftc (also LTP) > > +# - python-requests: ftc (also fuego_release_test) > > +# - python-reportlab: ftc > > +# - python-parsedatetime: ftc > > +# - python-pexpect: ssh_exec (part of ttc) > > +# - python-pip: to install filelock, flake8 > > +# - filelock: parser > > +mkdir -p /usr/share/man/man1 > > +apt-get update -q=3D2 && apt-get -q=3D2 -V --no-install-recommends ins= tall \ > > python-lxml python-simplejson python-yaml python-openpyxl \ > > python-requests python-reportlab python-parsedatetime \ > > - python-pip > > + python-pexpect python-pip python-setuptools python-wheel > > pip install filelock > > > > # Fuego command dependencies > > apt-get -q=3D2 -V --no-install-recommends install \ > > git sshpass openssh-client sudo net-tools wget curl lava-tool \ > > - bash-completion > > + bash-completion iproute2 > > > > # Default SDK for testing locally or on an x86 board > > apt-get -q=3D2 -V --no-install-recommends install \ > > build-essential cmake bison flex automake kmod libtool \ > > libelf-dev libssl-dev libsdl1.2-dev libcairo2-dev libxmu-dev \ > > - libxmuu-dev libglib2.0-dev libaio-dev u-boot-tools pkg-config > > + libxmuu-dev libglib2.0-dev libaio-dev pkg-config rsync u-boot-tools > > > > # Default test host dependencies > > +# - iperf iperf3 netperf: used as servers on the host > > +# - bzip2 bc: used for local tests by Functional.bzip2/bc > > +# - python-matplotlib: Benchmark.iperf3 parser > > +# - python-xmltodict: AGL tests > > +# - flake8: Functional.fuego_lint > > +# - netpipe-tcp - used by Benchmark.netpipe (provides the netpipe serv= er) > > +# - iputils-ping - for /bin/ping command, used by some tests > > +# FIXTHIS: install dependencies dynamically on the tests that need the= m > > apt-get -q=3D2 -V --no-install-recommends install \ > > - iperf iperf3 netperf bzip2 bc python-matplotlib python-xmltodict > > -pip install flake8 bsdmainutils > > + iperf iperf3 bzip2 bc python-matplotlib python-xmltodict \ > > + netpipe-tcp iputils-ping > > > > -echo "dash dash/sh boolean false" | debconf-set-selections > > -DEBIAN_FRONTEND=3Dnoninteractive dpkg-reconfigure dash > > -if [ -n "$http_proxy" ]; then > > - sed -i -e 's/#use_proxy =3D on/use_proxy =3D on/g' /etc/wgetrc > > - echo -e "http_proxy=3D$http_proxy\nhttps_proxy=3D$https_proxy" >> /et= c/environment > > +#TODO: find alternate package for netperf in buster version > > +if [ $suite !=3D "buster" ];then > > + apt-get -q=3D2 -V --no-install-recommends install netperf > > fi > > +pip install flake8 > > > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Clone fuego and fuego-core > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -if [ ! -d "/fuego" ]; then > > - cd / > > - git clone --branch next --depth=3D1 https://bitbucket.org/nirrognas/f= uego.git > > - ln -s /fuego/fuego-ro /fuego-ro > > - ln -s /fuego/fuego-rw /fuego-rw > > - cd fuego > > - git clone --branch next --depth=3D1 https://bitbucket.org/nirrognas/f= uego-core.git > > - ln -s /fuego/fuego-core /fuego-core > > -fi > > +# miscelaneous packages: > > +# python-serial - used by serio > > +# diffstat and vim - used by Tim > > +# time - useful for timing command duration > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + python-serial \ > > + diffstat \ > > + vim \ > > + time > > + > > +# install packages used by NuttX SDK > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + genromfs > > + > > +# FIXTHIS: determine if these tools are really necessary > > +#RUN apt-get -q=3D2 -V --no-install-recommends install \ > > +# apt-utils python-paramiko \ > > +# xmlstarlet rsync \ > > +# inotify-tools gettext netpipe-tcp \ > > +# at minicom lzop bsdmainutils \ > > +# mc netcat openssh-server > > + > > +# bsdmainutils provides hexdump, which is needed for netperf test > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + bsdmainutils > > + > > +echo "dash dash/sh boolean false" | debconf-set-selections > > +DEBIAN_FRONTEND=3Dnoninteractive dpkg-reconfigure dash > > > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > # Install Jenkins > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > - > > if [ $nojenkins -eq 0 ]; then > > #JENKINS_VERSION=3D2.164.2 > > #JENKINS_SHA=3D4536f43f61b1fca6c58bd91040fa09304eea96ab > > JENKINS_VERSION=3D2.249.3 > > JENKINS_SHA=3D534014c007edbb533a1833fe6f2dc115faf3faa2 > > JENKINS_URL=3Dhttps://pkg.jenkins.io/debian-stable/binary/jenkins_${J= ENKINS_VERSION}_all.deb > > - JENKINS_UC=3Dhttps://updates.jenkins.io > > - REF=3D/var/lib/jenkins/plugins > > - JENKINS_HOME=3D/var/lib/jenkins > > + export JENKINS_UC=3Dhttps://updates.jenkins.io > > + export REF=3D/var/lib/jenkins/plugins > > + export JENKINS_HOME=3D/var/lib/jenkins > > JENKINS_PORT=3D$port > > > > # Jenkins dependencies > > @@ -106,10 +167,12 @@ if [ $nojenkins -eq 0 ]; then > > pip install python-jenkins=3D=3D1.4.0 > > > > echo -e "JENKINS_PORT=3D$JENKINS_PORT" >> /etc/environment > > - groupadd jenkins > > - useradd -l -m -d "${JENKINS_HOME}" -g jenkins -G sudo -s /bin/bash je= nkins > > - cd > > - wget ${JENKINS_URL} > > + export JENKINS_PORT=3D$port > > + > > + getent group ${gid} >/dev/null || groupadd -g ${gid} ${group} > > + useradd -l -m -d "${JENKINS_HOME}" -u ${uid} -g ${gid} -G sudo -s /bi= n/bash ${user} > > + > > + wget -nv ${JENKINS_URL} > > echo "${JENKINS_SHA} jenkins_${JENKINS_VERSION}_all.deb" | sha1sum -c= - > > > > # allow Jenkins to start and install plugins, as part of dpkg install= ation > > @@ -117,11 +180,60 @@ if [ $nojenkins -eq 0 ]; then > > dpkg -i jenkins_${JENKINS_VERSION}_all.deb > > rm jenkins_${JENKINS_VERSION}_all.deb > > > > - # update ownership > > - chown -R jenkins:jenkins /fuego > > - chown -R jenkins:jenkins /fuego-ro > > - chown -R jenkins:jenkins /fuego-rw > > - chown -R jenkins:jenkins /fuego-core > > +fi > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# get ttc script and helpers > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc > > +/usr/local/src/ttc/install.sh /usr/local/bin > > +# as of ttc version 2.0.2, this should not be needed > > +#perl -p -i -e "s#config_dir =3D \"/etc\"#config_dir =3D \"/fuego-ro/c= onf\"#" /usr/local/bin/ttc > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# get ebf script and helpers > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +if [ $nojenkins -eq 0 ]; then > > + apt-get -q=3D2 -V --no-install-recommends install jq > > + git clone https://github.com/TimesysGit/board-farm-rest-api.git /usr/= local/src/board-farm-rest-api > > + cp /usr/local/src/board-farm-rest-api/cli/ebf /usr/local/bin/ebf > > + chmod a+x /usr/local/bin/ebf > > +fi > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Serial Config > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +git clone https://github.com/frowand/serio.git /usr/local/src/serio > > +if [ $nojenkins -eq 0 ]; then > > + cp frontend-install/0001-Fix-host-parsing-for-serial-device-with-in-n= ame.patch \ > > + frontend-install/0002-Output-data-from-port-during-command-execution= .patch \ > > + /tmp/ > > + patch -d /usr/local/src/serio -p1 > + patch -d /usr/local/src/serio -p1 > + chown -R jenkins /usr/local/src/serio > > +fi > > +cp /usr/local/src/serio/serio /usr/local/bin/ > > +ln -s /usr/local/bin/serio /usr/local/bin/sercp > > +ln -s /usr/local/bin/serio /usr/local/bin/sersh > > + > > +git clone https://github.com/tbird20d/serlogin.git /usr/local/src/serl= ogin > > +[ $nojenkins -eq 0 ] && chown -R jenkins /usr/local/src/serlogin > > +cp /usr/local/src/serlogin/serlogin /usr/local/bin > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# fserver > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +git clone https://github.com/tbird20d/fserver.git /usr/local/lib/fserv= er > > +ln -s /usr/local/lib/fserver/start_local_bg_server /usr/local/bin/star= t_local_bg_server > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Jenkins post installation > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +if [ $nojenkins -eq 0 ]; then > > + > > + # Fix jenkins issue, Java version check fails when java version is 11 > > + JAVA_VERSION_CHECK=3D"\$\(\$JAVA -version 2\>\&1 \| sed -n \';s/.* ve= rsion \"\\\(\[^.-\]*\\\)\\\.\\\(\[^.- > > \]*\\\).*\\\".*/\\\1\\\2\/p;')" > > + sed -i -e "s#^JAVA_VERSION=3D.*#JAVA_VERSION\=3D\"${JAVA_VERSION_CHEC= K}\"#g" /etc/init.d/jenkins > > > > source /etc/default/jenkins && \ > > JENKINS_ARGS=3D"$JENKINS_ARGS --prefix=3D/fuego" && \ > > @@ -138,116 +250,107 @@ if [ $nojenkins -eq 0 ]; then > > > > sed -i -e "s#8080#$JENKINS_PORT#g" /etc/default/jenkins > > > > - cp /fuego/frontend-install/install-plugins.sh \ > > - /fuego/frontend-install/jenkins-support \ > > - /fuego/frontend-install/clitest \ > > + # set up Jenkins plugins > > + cp frontend-install/install-plugins.sh \ > > + frontend-install/jenkins-support \ > > + frontend-install/clitest \ > > /usr/local/bin/ > > > > - cp /fuego/frontend-install/config.xml $JENKINS_HOME/config.xml > > - ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs > > - mkdir $JENKINS_HOME/userContent/docs > > - cp /fuego/docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-do= cs.pdf > > - jenkins cp /fuego/frontend-install/jenkins.model.JenkinsLocationConfi= guration.xml > > $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml > > - sed -i -e "s#8080#$JENKINS_PORT#g" $JENKINS_HOME/jenkins.model.Jenkin= sLocationConfiguration.xml > > - chown -R jenkins:jenkins $JENKINS_HOME/ > > - > > # start and stop jenkins to pre-populate some settings > > service jenkins start && \ > > sleep 30 && \ > > service jenkins stop > > > > + # install plugins - these versions are for Jenkins version 2.164.2 > > + # Explicitly install script-security v1.68, otherwise > > + # v1.74 will automatically be installed as a dependency of > > + # the junit plugin. Make sure to install before junit plugin. > > + # Explicitly install junit:1.27 > > + > > # install other plugins from Jenkins update center > > # NOTE: not sure all of these are needed, but keep list > > - # compatible with 1.2.1 release for now > > - #/usr/local/bin/install-plugins.sh \ > > - # ant:1.9 \ > > - # antisamy-markup-formatter:1.5 \ > > - # bouncycastle-api:2.17 \ > > - # command-launcher:1.3 \ > > - # description-setter:1.10 \ > > - # display-url-api:2.3.1 \ > > - # external-monitor-job:1.7 \ > > - # greenballs:1.15 \ > > - # icon-shim:2.0.3 \ > > - # javadoc:1.5 \ > > - # jdk-tool:1.2 \ > > - # junit:1.27 \ > > - # ldap:1.20 \ > > - # mailer:1.23 \ > > - # matrix-auth:2.3 \ > > - # matrix-project:1.14 \ > > - # pam-auth:1.4 \ > > - # pegdown-formatter:1.3 \ > > - # structs:1.17 \ > > - # windows-slaves:1.4 > > - > > - # install plugins for latest LTS Jenkins (currently 2.249.3) > > - /usr/local/bin/install-plugins.sh \ > > - script-security \ > > - structs \ > > - workflow-step-api \ > > - workflow-api \ > > - junit \ > > - scm-api \ > > - ant \ > > - antisamy-markup-formatter \ > > - bouncycastle-api \ > > - command-launcher \ > > - description-setter \ > > - display-url-api \ > > - external-monitor-job \ > > - greenballs \ > > - icon-shim \ > > - javadoc \ > > - jdk-tool \ > > - mailer \ > > - matrix-auth \ > > - matrix-project \ > > - pam-auth \ > > - pegdown-formatter \ > > - windows-slaves > > - > > - cp frontend-install/plugins/flot-plotter-plugin/flot.hpi $JENKINS_= HOME/plugins/flot.jpi > > + # as compatible as possible with 1.2.1 release for now > > + # Do NOT change the order of the plugins, unless you know what > > + # you are doing. Otherwise, the install-plugins.sh script will > > + # install the wrong versions of other plugins based on dependency > > + # information in the plugin files. > > > > + #/usr/local/bin/install-plugins.sh \ > > + # script-security:1.68 \ > > + # structs:1.20 \ > > + # workflow-step-api:2.22 \ > > + # workflow-api:2.40 \ > > + # junit:1.27 \ > > + # scm-api:2.6.3 \ > > + # ant:1.9 \ > > + # antisamy-markup-formatter:1.5 \ > > + # bouncycastle-api:2.17 \ > > + # command-launcher:1.3 \ > > + # description-setter:1.10 \ > > + # display-url-api:2.3.1 \ > > + # external-monitor-job:1.7 \ > > + # greenballs:1.15 \ > > + # icon-shim:2.0.3 \ > > + # javadoc:1.5 \ > > + # jdk-tool:1.2 \ > > + # ldap:1.20 \ > > + # mailer:1.23 \ > > + # matrix-auth:2.3 \ > > + # matrix-project:1.14 \ > > + # pam-auth:1.5 \ > > + # pegdown-formatter:1.3 \ > > + # windows-slaves:1.4 > > + > > + # install plugins for latest LTS Jenkins (currently 2.249.3) > > + /usr/local/bin/install-plugins.sh \ > > + script-security \ > > + structs \ > > + workflow-step-api \ > > + workflow-api \ > > + junit \ > > + scm-api \ > > + ant \ > > + antisamy-markup-formatter \ > > + bouncycastle-api \ > > + command-launcher \ > > + description-setter \ > > + display-url-api \ > > + external-monitor-job \ > > + greenballs \ > > + icon-shim \ > > + javadoc \ > > + jdk-tool \ > > + mailer \ > > + matrix-auth \ > > + matrix-project \ > > + pam-auth \ > > + pegdown-formatter \ > > + windows-slaves > > + > > + cp frontend-install/plugins/flot-plotter-plugin/flot.hpi $JENKINS_HOM= E/plugins/flot.jpi > > + > > + # jenkins should automatically unzip any plugins in the plugin dir > > # make the mod.js symlink well after flot is installed > > service jenkins start && sleep 30 && \ > > rm $JENKINS_HOME/plugins/flot/flot/mod.js && \ > > ln -s /fuego-core/scripts/mod.js $JENKINS_HOME/plugins/flot/flot/mod= .js > > > > - chown -R jenkins:jenkins $JENKINS_HOME/ > > -else > > - sed -i -e 's/jenkins_enabled=3D1/jenkins_enabled=3D0/g' /fuego-ro/con= f/fuego.conf > > -fi > > + mkdir -p $JENKINS_HOME/userContent/docs > > + ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs > > + cp docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf > > > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# get ttc script and helpers > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc > > -/usr/local/src/ttc/install.sh /usr/local/bin > > -perl -p -i -e "s#config_dir =3D \"/etc\"#config_dir =3D \"/fuego-ro/co= nf\"#" /usr/local/bin/ttc > > + cp frontend-install/config.xml $JENKINS_HOME/config.xml > > + cp frontend-install/jenkins.model.JenkinsLocationConfiguration.xml > > $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml > > + sed -i -e "s#8080#$JENKINS_PORT#g" $JENKINS_HOME/jenkins.model.Jenkin= sLocationConfiguration.xml > > > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Serial Config > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -if [ $nojenkins -eq 0 ]; then > > - /bin/bash -c 'git clone https://github.com/frowand/serio.git /usr/loc= al/src/serio ; chown -R jenkins /usr/local/src/serio ; cp > > /usr/local/src/serio/serio /usr/local/bin/ ; ln -s /usr/local/bin/serio= /usr/local/bin/sercp ; ln -s /usr/local/bin/serio /usr/local/bin/sersh' > > - /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /usr= /local/src/serlogin ; chown -R jenkins /usr/local/src/serlogin ; > > cp /usr/local/src/serlogin/serlogin /usr/local/bin' > > -else > > - /bin/bash -c 'git clone https://github.com/frowand/serio.git /usr/loc= al/src/serio ; cp /usr/local/src/serio/serio /usr/local/bin/ ; ln - > > s /usr/local/bin/serio /usr/local/bin/sercp ; ln -s /usr/local/bin/seri= o /usr/local/bin/sersh' > > - /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /usr= /local/src/serlogin ; cp /usr/local/src/serlogin/serlogin > > /usr/local/bin' > > + chown -R jenkins:jenkins $JENKINS_HOME/ > > fi > > > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# fserver > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -git clone https://github.com/tbird20d/fserver.git /usr/local/lib/fserv= er > > -ln -s /usr/local/lib/fserver/start_local_bg_server /usr/local/bin/star= t_local_bg_server > > - > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > # ftc post installation > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > ln -s /fuego-core/scripts/ftc /usr/local/bin/ > > -cp /fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc > > +cp fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc > > echo ". /etc/bash_completion" >> /root/.bashrc > > > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > @@ -255,14 +358,3 @@ echo ". /etc/bash_completion" >> /root/.bashrc > > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > ln -s /fuego-ro/scripts/fuego-lava-target-setup /usr/local/bin > > ln -s /fuego-ro/scripts/fuego-lava-target-teardown /usr/local/bin > > - > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -# Small guide > > -# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > -echo "Run 'service netperf start' to start a netperf server" > > -echo "Run 'iperf3 -V -s -D -f M' to start an iperf3 server" > > -echo "Run 'ftc list-boards' to see the available boards" > > -echo "Run 'ftc list-tests' to see the available tests" > > -echo "Run 'ftc run-test -b local -t Functional.hello_world' to run a h= ello world" > > -echo "Run 'ftc run-test -b local -t Benchmark.Dhrystone -s 500M' to ru= n Dhrystone" > > -echo "Run 'ftc gen-report' to get results" > > diff --git a/install-fuego.sh b/install-fuego.sh > > new file mode 100755 > > index 0000000..7b3e010 > > --- /dev/null > > +++ b/install-fuego.sh > > @@ -0,0 +1,109 @@ > > +#!/bin/bash > > +# 2019 (c) Toshiba corp. > > +# > > +# Usage: > > +# $ sudo ./install-fuego.sh [--help|-h] [-d ] [-s ] [-p ] [--nojenkins] > > +# > > + > > +usage(){ > > + echo "" > > + echo "Usage: sudo ./install-fuego.sh [--help|-h] [-d ] [-s ] [-p ] [--nojenkins]" > > + echo "Install fuego on Debian filesystem." > > + echo "" > > + echo "options:" > > + echo " --help | -h Show usage help" > > + echo " --dist | -d Specify distribution" > > + echo " --suite | -s Specify suite" > > + echo " --port | -p Jenkins port" > > + echo " --nojenkins Install Fuego without Jenkins= " > > + echo "" > > +} > > + > > +if [[ $EUID -ne 0 ]]; then > > + echo "Sorry, you need root permissions" > > + exit 1 > > +fi > > + > > +nojenkins=3D > > +port=3D8090 > > +dist=3Ddebian > > +suite=3Dstretch > > +fuego_dir=3D$(pwd) > > + > > +while [ "$1" !=3D "" ]; do > > + case $1 in > > + -d | --dist ) > > + shift > > + dist=3D$1 > > + ;; > > + -s | --suite ) > > + shift > > + suite=3D$1 > > + ;; > > + -p | --port ) > > + shift > > + port=3D$1 > > + ;; > > + --nojenkins ) > > + nojenkins=3D"--nojenkins" > > + ;; > > + -h | --help ) > > + usage > > + exit 0 > > + ;; > > + * ) > > + break > > + esac > > + shift > > +done > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Clone fuego-core > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +if [ ! -f "fuego-core/scripts/ftc" ]; then > > + # set fuego-core branch to same as current fuego branch > > + # get current git branch > > + set -o noglob > > + while IFS=3D" " read -r part1 part2 ; do > > + if [ $part1 =3D "*" ] ; then > > + branch=3D$part2 > > + fi > > + done < <(git branch) > > + set +o noglob > > + git clone -b $branch https://bitbucket.org/fuegotest/fuego-core.git > > +fi > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Install fuego on host system > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +./install-$dist.sh -s $suite -p $port $nojenkins > > + > > +systemctl daemon-reload > > +service jenkins restart > > + > > +# provide permission to current user > > +usermod -aG jenkins $USER > > +chmod -R 775 $fuego_dir/fuego-rw > > + > > +chown -R jenkins:jenkins $fuego_dir/fuego-ro > > +chown -R jenkins:jenkins $fuego_dir/fuego-rw > > +chown -R jenkins:jenkins $fuego_dir/fuego-core > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Create Links to fuego folders > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +ln -s $fuego_dir/fuego-ro / > > +ln -s $fuego_dir/fuego-rw / > > +ln -s $fuego_dir/fuego-core / > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Small guide > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +echo "Logout and Login current user session to work properly" > > +echo "Run 'service netperf start' to start a netperf server" > > +echo "Run 'iperf3 -V -s -D -f M' to start an iperf3 server" > > +echo "Run 'ftc list-boards' to see the available boards" > > +echo "Run 'ftc list-tests' to see the available tests" > > +echo "Run 'ftc run-test -b local -t Functional.hello_world' to run a h= ello world" > > +echo "Run 'ftc run-test -b local -t Benchmark.Dhrystone -s 500M' to ru= n Dhrystone" > > +echo "Run 'ftc gen-report' to get results" > > diff --git a/install-stretch.sh b/install-stretch.sh > > new file mode 100755 > > index 0000000..4f6f724 > > --- /dev/null > > +++ b/install-stretch.sh > > @@ -0,0 +1,288 @@ > > +#!/bin/bash > > +# 2019 (c) Toshiba corp. > > +# > > +# Usage: > > +# $ sudo ./install-.sh [--help|-h] [--nojenkins] [= ] > > +# > > +usage(){ > > + > > +cat < > +Usage: sudo ./install-.sh [--help|-h] [--nojenkins] [] > > + > > +Install fuego on the host Debian filesystem. > > + > > +options: > > + --help Show usage help > > + --nojenkins Install Fuego without Jenkins > > +HERE > > +} > > + > > +if [[ $EUID -ne 0 ]]; then > > + echo "Sorry, you need root permissions" > > + exit 1 > > +fi > > + > > +nojenkins=3D0 > > + > > +POSITIONAL=3D() > > +while [[ $# -gt 0 ]] ; do > > + case $1 in > > + --nojenkins) > > + nojenkins=3D1 > > + shift > > + ;; > > + --help | -h) > > + usage > > + exit 0 > > + ;; > > + *) > > + POSITIONAL+=3D("$1") # save argument for later > > + shift > > + esac > > +done > > +set -- "${POSITIONAL[@]}" # restore positional arguments > > + > > +port=3D${2:-8090} > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Install Fuego dependencies > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > + > > +mkdir -p /usr/share/man/man1 > > + > > +# netperf is in non-free > > +echo deb http://deb.debian.org/debian stretch main non-free > /etc/apt= /sources.list > > +echo deb http://security.debian.org/debian-security stretch/updates ma= in >> /etc/apt/sources.list > > + > > +apt-get update -q=3D2 > > + > > +# Fuego python dependencies > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + python-lxml python-simplejson python-yaml python-openpyxl \ > > + python-requests python-reportlab python-parsedatetime \ > > + python-pexpect python-pip python-setuptools python-wheel > > +pip install filelock > > + > > +# Fuego command dependencies > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + git sshpass openssh-client sudo net-tools wget curl lava-tool \ > > + bash-completion iproute2 > > + > > +# Default SDK for testing locally or on an x86 board > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + build-essential cmake bison flex kmod automake libtool \ > > + libelf-dev libssl-dev libsdl1.2-dev libcairo2-dev libxmu-dev \ > > + libxmuu-dev libglib2.0-dev libaio-dev pkg-config rsync u-boot-tools > > + > > +# Default test host dependencies > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + iperf iperf3 netperf bzip2 bc python-matplotlib python-xmltodict \ > > + netpipe-tcp iputils-ping > > +pip install flake8 > > + > > +# miscelaneous packages: > > +# python-serial - used by serio > > +# diffstat and vim - used by Tim > > +# time - useful for timing command duration > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + python-serial \ > > + diffstat \ > > + vim \ > > + time > > + > > +# install packages used by NuttX SDK > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + genromfs > > + > > +# bsdmainutils provides hexdump, which is needed for netperf test > > +apt-get -q=3D2 -V --no-install-recommends install \ > > + bsdmainutils > > + > > +echo "dash dash/sh boolean false" | debconf-set-selections > > +DEBIAN_FRONTEND=3Dnoninteractive dpkg-reconfigure dash > > + > > +# TODO: check if proxy settings can set outside docker container > > +#if [ -n "$http_proxy" ]; then > > +# sed -i -e 's/#use_proxy =3D on/use_proxy =3D on/g' /etc/wgetrc > > +# echo -e "http_proxy=3D$http_proxy\nhttps_proxy=3D$https_proxy"= >> /etc/environment > > +#fi > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Install Jenkins > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > + > > +if [ $nojenkins -eq 0 ]; then > > + #JENKINS_VERSION=3D2.164.2 > > + #JENKINS_SHA=3D4536f43f61b1fca6c58bd91040fa09304eea96ab > > + JENKINS_VERSION=3D2.249.3 > > + JENKINS_SHA=3D534014c007edbb533a1833fe6f2dc115faf3faa2 > > + JENKINS_URL=3Dhttps://pkg.jenkins.io/debian-stable/binary/jenkins_${J= ENKINS_VERSION}_all.deb > > + export JENKINS_UC=3Dhttps://updates.jenkins.io > > + REF=3D/var/lib/jenkins/plugins > > + JENKINS_HOME=3D/var/lib/jenkins > > + JENKINS_PORT=3D$port > > + > > + # Jenkins dependencies > > + apt-get -q=3D2 -V --no-install-recommends install \ > > + default-jdk daemon psmisc adduser procps unzip > > + pip install python-jenkins=3D=3D1.4.0 > > + > > + echo -e "JENKINS_PORT=3D$JENKINS_PORT" >> /etc/environment > > + export JENKINS_PORT=3D$port > > + > > + groupadd jenkins > > + useradd -l -m -d "${JENKINS_HOME}" -g jenkins -G sudo -s /bin/bash je= nkins > > + > > + wget -nv ${JENKINS_URL} > > + echo "${JENKINS_SHA} jenkins_${JENKINS_VERSION}_all.deb" | sha1sum -c= - > > + > > + # allow Jenkins to start and install plugins, as part of dpkg install= ation > > + printf "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d > > + dpkg -i jenkins_${JENKINS_VERSION}_all.deb > > + rm jenkins_${JENKINS_VERSION}_all.deb > > + > > + source /etc/default/jenkins && \ > > + JENKINS_ARGS=3D"$JENKINS_ARGS --prefix=3D/fuego" && \ > > + sed -i -e "s#JENKINS_ARGS.*#JENKINS_ARGS\=3D\"${JENKINS_ARGS}\"#g" /= etc/default/jenkins > > + > > + source /etc/default/jenkins && \ > > + JAVA_ARGS=3D"$JAVA_ARGS -Djenkins.install.runSetupWizard=3Dfalse - > > Dhudson.model.DirectoryBrowserSupport.allowSymlinkEscape=3Dtrue" && \ > > + if [ -n "$http_proxy" ]; then \ > > + PROXYSERVER=3D$(echo $http_proxy | sed -E 's/^http://' | sed -E 's/= \///g' | sed -E 's/(.*):(.*)/\1/') && \ > > + PROXYPORT=3D$(echo $http_proxy | sed -E 's/^http://' | sed -E 's/\/= //g' | sed -E 's/(.*):(.*)/\2/') && \ > > + JAVA_ARGS=3D"$JAVA_ARGS -Dhttp.proxyHost=3D"${PROXYSERVER}" -Dhttp.= proxyPort=3D"${PROXYPORT}" - > > Dhttps.proxyHost=3D"${PROXYSERVER}" -Dhttps.proxyPort=3D"${PROXYPORT}; = \ > > + fi && \ > > + sed -i -e "s#^JAVA_ARGS.*#JAVA_ARGS\=3D\"${JAVA_ARGS}\"#g" /etc/defa= ult/jenkins; > > + > > + sed -i -e "s#8080#$JENKINS_PORT#g" /etc/default/jenkins > > + > > + # set up Jenkins plugins > > + cp frontend-install/install-plugins.sh \ > > + frontend-install/jenkins-support \ > > + frontend-install/clitest \ > > + /usr/local/bin/ > > + > > + mkdir -p $JENKINS_HOME/userContent/docs > > + cp frontend-install/config.xml $JENKINS_HOME/config.xml > > + ln -s /fuego-rw/logs $JENKINS_HOME/userContent/fuego.logs > > + cp docs/fuego-docs.pdf $JENKINS_HOME/userContent/docs/fuego-docs.pdf > > + cp frontend-install/jenkins.model.JenkinsLocationConfiguration.xml > > $JENKINS_HOME/jenkins.model.JenkinsLocationConfiguration.xml > > + sed -i -e "s#8080#$JENKINS_PORT#g" $JENKINS_HOME/jenkins.model.Jenkin= sLocationConfiguration.xml > > + chown -R jenkins:jenkins $JENKINS_HOME/ > > + > > + # start and stop jenkins to pre-populate some settings > > + service jenkins start && \ > > + sleep 30 && \ > > + service jenkins stop > > + > > + # install other plugins from Jenkins update center > > + # NOTE: not sure all of these are needed, but keep list > > + # compatible with 1.2.1 release for now > > + #/usr/local/bin/install-plugins.sh \ > > + # ant:1.9 \ > > + # antisamy-markup-formatter:1.5 \ > > + # bouncycastle-api:2.17 \ > > + # command-launcher:1.3 \ > > + # description-setter:1.10 \ > > + # display-url-api:2.3.1 \ > > + # external-monitor-job:1.7 \ > > + # greenballs:1.15 \ > > + # icon-shim:2.0.3 \ > > + # javadoc:1.5 \ > > + # jdk-tool:1.2 \ > > + # junit:1.27 \ > > + # ldap:1.20 \ > > + # mailer:1.23 \ > > + # matrix-auth:2.3 \ > > + # matrix-project:1.14 \ > > + # pam-auth:1.4 \ > > + # pegdown-formatter:1.3 \ > > + # structs:1.17 \ > > + # windows-slaves:1.4 > > + > > + # install plugins for latest LTS Jenkins (currently 2.249.3) > > + /usr/local/bin/install-plugins.sh \ > > + script-security \ > > + structs \ > > + workflow-step-api \ > > + workflow-api \ > > + junit \ > > + scm-api \ > > + ant \ > > + antisamy-markup-formatter \ > > + bouncycastle-api \ > > + command-launcher \ > > + description-setter \ > > + display-url-api \ > > + external-monitor-job \ > > + greenballs \ > > + icon-shim \ > > + javadoc \ > > + jdk-tool \ > > + mailer \ > > + matrix-auth \ > > + matrix-project \ > > + pam-auth \ > > + pegdown-formatter \ > > + windows-slaves > > + > > + cp frontend-install/plugins/flot-plotter-plugin/flot.hpi $JENKINS_= HOME/plugins/flot.jpi > > + > > + # make the mod.js symlink well after flot is installed > > + service jenkins start && sleep 30 && \ > > + rm $JENKINS_HOME/plugins/flot/flot/mod.js && \ > > + ln -s /fuego-core/scripts/mod.js $JENKINS_HOME/plugins/flot/flot/mod= .js > > + > > + chown -R jenkins:jenkins $JENKINS_HOME/ > > +fi > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# get ttc script and helpers > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +git clone https://github.com/tbird20d/ttc.git /usr/local/src/ttc > > +/usr/local/src/ttc/install.sh /usr/local/bin > > +perl -p -i -e "s#config_dir =3D \"/etc\"#config_dir =3D \"/fuego-ro/co= nf\"#" /usr/local/bin/ttc > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Serial Config > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +if [ $nojenkins -eq 0 ]; then > > + /bin/bash -c 'git clone https://github.com/frowand/serio.git /usr/loc= al/src/serio ; chown -R jenkins /usr/local/src/serio ; cp > > /usr/local/src/serio/serio /usr/local/bin/ ; ln -s /usr/local/bin/serio= /usr/local/bin/sercp ; ln -s /usr/local/bin/serio /usr/local/bin/sersh' > > + /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /usr= /local/src/serlogin ; chown -R jenkins /usr/local/src/serlogin ; > > cp /usr/local/src/serlogin/serlogin /usr/local/bin' > > +else > > + /bin/bash -c 'git clone https://github.com/frowand/serio.git /usr/loc= al/src/serio ; cp /usr/local/src/serio/serio /usr/local/bin/ ; ln - > > s /usr/local/bin/serio /usr/local/bin/sercp ; ln -s /usr/local/bin/seri= o /usr/local/bin/sersh' > > + /bin/bash -c 'git clone https://github.com/tbird20d/serlogin.git /usr= /local/src/serlogin ; cp /usr/local/src/serlogin/serlogin > > /usr/local/bin' > > +fi > > +cp frontend-install/0001-Fix-host-parsing-for-serial-device-with-in-na= me.patch \ > > + frontend-install/0002-Output-data-from-port-during-command-execution= .patch \ > > + /tmp/ > > +/bin/bash -c 'patch -d /usr/local/src/serio -p1 > + patch -d /usr/local/src/serio -p1 > + > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# get ebf script and helpers > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +apt-get -q=3D2 -V --no-install-recommends install jq > > +git clone https://github.com/TimesysGit/board-farm-rest-api.git /usr/l= ocal/src/board-farm-rest-api > > +cp /usr/local/src/board-farm-rest-api/cli/ebf /usr/local/bin/ebf > > +chmod a+x /usr/local/bin/ebf > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# fserver > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +git clone https://github.com/tbird20d/fserver.git /usr/local/lib/fserv= er > > +ln -s /usr/local/lib/fserver/start_local_bg_server /usr/local/bin/star= t_local_bg_server > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# ftc post installation > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +ln -s /fuego-core/scripts/ftc /usr/local/bin/ > > +cp fuego-core/scripts/ftc_completion.sh /etc/bash_completion.d/ftc > > +echo ". /etc/bash_completion" >> /root/.bashrc > > + > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +# Lava > > +# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > +ln -s /fuego-ro/scripts/fuego-lava-target-setup /usr/local/bin > > +ln -s /fuego-ro/scripts/fuego-lava-target-teardown /usr/local/bin > > diff --git a/install.sh b/install.sh > > index a5a90b0..259c887 100755 > > --- a/install.sh > > +++ b/install.sh > > @@ -1,13 +1,13 @@ > > #!/bin/bash > > # > > -# install.sh [--help] [--priv] [--no-cache] [--nojenkins] [] [] > > +# install.sh [--help] [--priv] [--no-cache] [--nojenkins] [] [] [] [] > > # > > > > # $1 is the exit code after usage is shown > > usage() { > > exit_code=3D"$1" > > cat < > -Usage: install.sh [--help] [--priv] [--no-cache] [--nojenkins] [] [] > > +Usage: install.sh [--help] [--priv] [--no-cache] [--nojenkins] [] [] [] [] > > > > Create the docker image and container with the Fuego test distribution= . > > If no is provided, the image will be named 'fuego'. > > @@ -34,7 +34,7 @@ fi > > > > priv=3D0 > > NOCACHE=3D"" > > -dockerfile=3D"Dockerfile" > > +NOJENKINS=3D"" > > > > POSITIONAL=3D() > > while [[ $# -gt 0 ]] ; do > > @@ -48,7 +48,7 @@ while [[ $# -gt 0 ]] ; do > > shift > > ;; > > --nojenkins) > > - dockerfile=3D"Dockerfile.nojenkins" > > + NOJENKINS=3D"--nojenkins" > > shift > > ;; > > *) > > @@ -60,6 +60,8 @@ set -- "${POSITIONAL[@]}" # restore positional argume= nts > > > > image_name=3D${1:-fuego} > > jenkins_port=3D${2:-8090} > > +distribution=3D${3:-debian} > > +suite=3D${4:-stretch} > > > > container_name=3D"${image_name}-container" > > > > @@ -79,7 +81,7 @@ fi > > > > set -e > > > > -source fuego-host-scripts/docker-build-image.sh $NOCACHE ${image_name}= ${jenkins_port} ${dockerfile} > > +source fuego-host-scripts/docker-build-image.sh $NOCACHE ${image_name}= ${jenkins_port} ${distribution} ${suite} ${NOJENKINS} > > if [ "$priv" =3D=3D "0" ]; then > > fuego-host-scripts/docker-create-container.sh ${image_name} ${cont= ainer_name} > > else > > diff --git a/uninstall-fuego.sh b/uninstall-fuego.sh > > new file mode 100644 > > index 0000000..b899e7c > > --- /dev/null > > +++ b/uninstall-fuego.sh > > @@ -0,0 +1,47 @@ > > +#!/bin/bash > > + > > +# Remove Jenkins plugins > > +[ -d /usr/share/jenkins/ref/plugins/ ] && rm -rf /usr/share/jenkins/re= f/plugins > > + > > +# uninstall Jenkins > > +service jenkins stop > > +dpkg -P jenkins > > + > > +[ -f /usr/local/bin/install-plugins.sh ] && rm -f /usr/local/bin/insta= ll-plugins.sh > > +[ -f /usr/local/bin/jenkins-support ] && rm -rf /usr/local/bin/jenkins= -support > > +[ -f /usr/local/bin/clitest ] && rm -rf /usr/local/bin/clitest > > +[ -d /var/lib/jenkins ] && rm -rf /var/lib/jenkins > > +sed -i '/^JENKINS_PORT=3D/d' /etc/environment > > + > > +# uninstall ttc script > > +[ -d /usr/local/src/ttc ] && rm -rf /usr/local/src/ttc > > + > > +# uninstall ebf script > > +[ -d /usr/local/src/board-farm-rest-api ] && rm -rf /usr/local/src/boa= rd-farm-rest-api > > +[ -f /usr/local/bin/ebf ] && rm -f /usr/local/bin/ebf > > + > > +# uninstall serial config > > +[ -d /usr/local/src/serio ] && rm -rf /usr/local/src/serio > > +[ -f /usr/local/bin/serio ] && rm -rf /usr/local/bin/serio > > +[ -f /usr/local/bin/sercp ] && rm -rf /usr/local/bin/sercp > > +[ -f /usr/local/bin/sersh ] && rm -rf /usr/local/bin/sersh > > +[ -d /usr/local/src/serlogin ] && rm -rf /usr/local/src/serlogin > > +[ -f /usr/local/bin/serlogin ] && rm -rf /usr/local/bin/serlogin > > + > > +# uninstall fserver > > +[ -d /usr/local/lib/fserver ] && rm -f /usr/local/bin/fserver > > +[ -f /usr/local/bin/start_local_bg_server ] && rm -rf /usr/local/bin/s= tart_local_bg_server > > + > > +# uninstall ftc > > +[ -f /usr/local/bin/ftc ] && rm -rf /usr/local/bin/ftc > > +[ -f /etc/bash_completion.d/ftc ] && rm -rf /etc/bash_completion.d/ftc > > + > > +# remove lava target files > > +[ -f /usr/local/bin/fuego-lava-target-setup ] && rm -rf /usr/local/bin= /fuego-lava-target-setup > > +[ -f /usr/local/bin/fuego-lava-target-teardown ] && rm -rf /usr/local/= bin/fuego-lava-target-teardown > > + > > +# remove links > > +[ -d /fuego-ro ] && rm /fuego-ro > > +[ -d /fuego-rw ] && rm /fuego-rw > > +[ -d /fuego-core ] && rm /fuego-core > > + > > -- > > 2.20.1 > > >=20 > Overall - this looks like a good start. But I'd like to see the duplicat= e sections of install-buster.sh > and install-stretch.sh put into a single location "install-debian-common.= sh". Also, I'd like to see > the non-debian stuff (ttc, serio, ebf, etc.) put into "install-common.sh"= . >=20 > Can you please re-do this with that refactoring in mind? >=20 > Thanks, > -- Tim