[[pragmatic-development-environment-on-opensuse]]
pragmatic development environment on openSUSE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1.  install openQA package to get all the runtime dependencies as described in
the
https://github.com/os-autoinst/openQA/blob/master/docs/Installing.asciidoc[openQA
installation guide]
+
2.  check out os-autoinst
+
------------------------------------------------
git clone YOUR-WRITEABLE-COPY-OF/os-autoinst.git
cd os-autoinst
------------------------------------------------
3.  install the BuildRequires, as per the http://build.opensuse.org[spec
file]
+
-----------------------------------------------------------------------------------------------------------------------------------
sudo zypper in git-core make libtheora-devel opencv-devel fftw3-devel libsndfile-devel pkg-config libtool autoconf automake gcc-c++
-----------------------------------------------------------------------------------------------------------------------------------
4.  build the beastie locally
+
----------------
autoreconf -f -i
./configure
make
----------------
5.  get the test cases and the needles.
+
The needles have to be a subdir of the test cases!
+
-----------------------------------------------------------------------------
mkdir distri
cd distri
git clone git@github.com:os-autoinst/os-autoinst-distri-opensuse.git opensuse
cd opensuse
git clone git@github.com:os-autoinst/os-autoinst-needles-opensuse.git needles
-----------------------------------------------------------------------------
6.  create a test dir to run os-autoinst in
+
--------------------------
mkdir /tmp/os-autoinst-run
cd /tmp/os-autoinst-run
--------------------------
7.  create a minimal "vars.json" config file
+
---------------------------------------------------------
cat <<EOF >vars.json
{
    "DISTRI":  "sle",
    "CASEDIR": "/space/SVN/os-autoinst-distri-opensuse/",
    "BACKEND": "s390x"
}
EOF
---------------------------------------------------------
8.  give it a shot
+
------------------------------
PATH_TO/os-autoinst/isotovideo
------------------------------
9.  hack away :)

[[use-of-git-repo-with-with-openqa]]
use of git repo with with openQA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

to use os-autoinst with openQA it needs to be "installed". Placing a
symlink to /usr/lib/os-autoinst that points to the git checkout should
work. To make tests and needles writable don't touch distri/ and use
tools/fetchneedles instead to set it up.

[[opensuse-setup]]
openSUSE setup
~~~~~~~~~~~~~~

-------------------------------------------------------
zypper ar -r http://download.opensuse.org/repositories/devel:/openQA/openSUSE_Leap_42.1/devel:openQA.repo
zypper in os-autoinst

usermod -G kvm -a $USERNAME || usermod -A kvm $USERNAME
-------------------------------------------------------

[[more-linux-setup]]
more Linux setup
~~~~~~~~~~~~~~~~

-----------------------------------------------------------
modprobe kvm-intel || modprobe kvm-amd
chgrp kvm /dev/kvm ; chmod g+rw /dev/kvm # maybe redundant
# optionally use a new user; just to keep things separate
useradd -m USERNAME -G kvm
passwd USERNAME # and/or add ~USERNAME/.ssh/authorized_keys
-----------------------------------------------------------

