Commit 50d6b426 authored by Maxime Perrotin's avatar Maxime Perrotin

Merge branch 'master' of https://gitrepos.estec.esa.int/taste/taste-setup into stm32

parents d5c41c98 4bd76975
......@@ -25,12 +25,10 @@ XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
touch ${XAUTH}
xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f ${XAUTH} nmerge -
HOME=/root
export TASTE_IN_DOCKER=1
docker run \
--privileged \
-e DISPLAY \
-e HOME \
-e TASTE_IN_DOCKER \
-e XAUTHORITY=${XAUTH} \
-v ${XSOCK}:${XSOCK} \
......
......@@ -4,31 +4,62 @@ TASTE
This is the meta package that is used to install all git modules required
to make a TASTE installation.
If possible, please use the TASTE VM - available at http://taste.tools
Installation
============
TASTE Virtual Machine
---------------------
If possible, please use the TASTE VM - it is available at [http://taste.tools](http://taste.tools)
(follow the 'Downloads' link and download the .ova file - that's a VirtualBox
machine that you can import via VirtualBox's "File/Import Appliance")
machine that you can import via VirtualBox's *"File/Import Appliance"*).
Docker container
----------------
The repository includes a Dockerfile, that creates a fully functional "taste" Docker image,
built from the sources necessary in all the submodules.
Simply Process this Dockerfile with:
docker build -t taste .
Otherwise, use a Debian-based distribution, create a new 'taste' user, and...
And we then recommend to launch a fresh TASTE container with proper X11 redirection setup, with...
$ git clone --recursive https://gitrepos.estec.esa.int/taste/taste-setup.git tool-src
...followed by
./Docker-run.sh
This script does all the necessary setup to map your local X11 socket inside the container,
allowing you to use X11 applications. In addition, your `$HOME` folder is mapped inside the
container under the `/root/work` folder, so any work you do in there will survive the
container's eventual closing. As with all Docker containers, you can also commit the
changes you perform in your container (via `docker commit...`) and create your own
customized images.
For users where the TASTE VM is a concern for reasons of security *(e.g. uncertainty of what
exactly is included inside it)* the Docker container is a complete and clear answer:
it is built from source, so there is full visibility on what is inside it.
In Debian-based distributions
-----------------------------
In theory, under a modern Debian-based distribution a native install is also possible:
you would start by creating a new 'taste' user, and...
$ git clone https://gitrepos.estec.esa.int/taste/taste-setup.git tool-src
$ cd tool-src
$ ./Update-TASTE.sh
Then follow the prompts to fix whatever issues are detected in your configuration.
You'd then have to follow the prompts to fix whatever issues are detected in your configuration.
In any native distribution offering `debootstrap`
-------------------------------------------------
Since the installation scripts depend on Debian tools, the setup process only works as-is inside environments that are Debian-based. Note however that almost all distributions offer `debootstrap` - a tool that allows the setup of a complete Debian chroot:
The setup depends on the environment being a Debian distro; if this is not the case,
you can try the setup from inside a debootstrap-ed chroot:
# mkdir /opt/jessie-chroot
# debootstrap jessie /opt/jessie-chroot
# mount -t proc none /opt/jessie-chroot/proc/
# mount -t sysfs none /opt/jessie-chroot/sys/
# mount -o bind /dev /opt/jessie-chroot/dev/
# mount -o bind /dev/pts /opt/jessie-chroot/dev/pts/
# chroot /opt/jessie-chroot
# mkdir /opt/stretch-chroot
# debootstrap stretch /opt/stretch-chroot
# mount -t proc none /opt/stretch-chroot/proc/
# mount -t sysfs none /opt/stretch-chroot/sys/
# mount -o bind /dev /opt/stretch-chroot/dev/
# mount -o bind /dev/pts /opt/stretch-chroot/dev/pts/
# chroot /opt/stretch-chroot
At this point, you can continue with the normal process described above for Debian-based distributions - for (almost) all intents and purposes, this chroot will behave just like a native Debian install; and thus allows you to have a "sandboxed" TASTE install that will not interfere with your main distribution.
There is also a Dockerfile (currently under construction) that will eventually
automate the setup enough to allow working under any distribution.
In fact, this is reason enough to employ this process even if you do have a Debian-based distribution; the chroot will contain all TASTE-related work, and will therefore leave your main distribution undisturbed.
machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker"
override:
- docker info
- if [[ -e ~/docker/image.tar ]]; then docker load --input ~/docker/image.tar; else docker build -t taste . && { mkdir -p ~/docker; docker save taste > ~/docker/image.tar ; } ; fi:
timeout: 3600
test:
override:
- HOMEB=/root ; XSOCK=/tmp/.X11-unix ; XAUTH=/tmp/.docker.xauth ; touch ${XAUTH} ; xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f ${XAUTH} nmerge - ; HOME=/root ; export TASTE_IN_DOCKER=1 ; docker run --privileged -e DISPLAY -e HOME -e TASTE_IN_DOCKER -e XAUTHORITY=${XAUTH} -v ${XSOCK}:${XSOCK} -v ${XAUTH}:${XAUTH} -v "$HOME":"$HOMEB"/work -it taste /bin/bash -c 'cd /root/ ; . .bashrc.taste ; cd tool-src ; ./Update-TASTE.sh || exit 1 ; cd testSuites ; ./regression.py || exit 1':
timeout: 3600
......@@ -7,6 +7,7 @@ mkfifo $myfifo
tail -f $myfifo | taste-progress-dialog.py &
function quit {
echo '100 Done' > $myfifo
rm $myfifo
tailps=$(pstree -p $$ | grep tail | python -c "import sys, re; print re.search(r'tail\((.*)\)', [x for x in sys.stdin][0]).group(1)")
kill $tailps || xterm -e "echo Internal Error, unable to kill subprocess. Open a terminal and type 'pkill tail' to (hopefully) recover"
......@@ -141,6 +142,4 @@ else
mv "$tempdir"/ConcurrencyView .
fi
echo '100 Done' > $myfifo
quit 0
......@@ -9,6 +9,7 @@ mkfifo $myfifo
tail -f $myfifo | taste-progress-dialog.py &
function quit {
echo '100 Done' > $myfifo
rm $myfifo
tailps=$(pstree -p $$ | grep tail | python -c "import sys, re; print re.search(r'tail\((.*)\)', [x for x in sys.stdin][0]).group(1)")
kill $tailps || xterm -e "echo Internal Error, unable to kill subprocess. Open a terminal and type 'pkill tail' to (hopefully) recover"
......@@ -113,7 +114,6 @@ cp -f __interfaceview-v2.aadl "$INTERFACEVIEW" 2>/dev/null || :
rm -f "$output_dir"/dataview-uniq.asn "$output_dir"/dataview-uniq.aadl "$output_dir"/dataview-uniq-v1.aadl \
"$output_dir"/__interfaceview-v2.aadl
echo '100 Done' > $myfifo
quit $ret
......
......@@ -8,6 +8,7 @@ mkfifo $myfifo
tail -f $myfifo | taste-progress-dialog.py &
function quit {
echo '100 Completed' > $myfifo
rm $myfifo
tailps=$(pstree -p $$ | grep tail | python -c "import sys, re; print re.search(r'tail\((.*)\)', [x for x in sys.stdin][0]).group(1)")
kill $tailps || xterm -e "echo Internal Error, unable to kill subprocess. Open a terminal and type 'pkill tail' to (hopefully) recover"
......@@ -93,7 +94,6 @@ DATAVIEW+=" $(taste-config --prefix)/share/taste-types/taste-types.asn"
#asn2aadlPlus $DATAVIEW "$AADL" -aadlv2 2>&1 | uniq >&2
echo '0-100 Updating data view' > $myfifo
asn2aadlPlus $DATAVIEW "$AADL" -aadlv2 2>&1 > >(uniq >&2)
echo '100 Completed' > $myfifo
if [ "$?" = "1" ]
then
......
Subproject commit a551c05c0008f0b348ac55cdd39a98b2b26e9b43
Subproject commit 875d8b92d1bbb54b728d14118a81f2dfb8c0a02b
Subproject commit f8c98de517260bc3c38d3802c1e57ff3a2c1f504
Subproject commit e132e75518f512dc5b622b1cf3fd3f706a58c292
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment