diff --git a/Makefile.am b/Makefile.am index 22575b7a913..2695d614d0c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,8 +39,12 @@ pkglibexec_SCRIPTS = \ ocr.pm \ cv.pm \ needle.pm \ - crop.py \ - start.pl + crop.py + +bin_SCRIPTS = isotovideo + +install-exec-hook: + sed -i -e "s,my \$$installprefix.*,my \$$installprefix = '$(pkglibexecdir)';," $(DESTDIR)$(bindir)/isotovideo pkglibexec_FOLDERS = \ distri \ @@ -51,8 +55,6 @@ pkglibexec_FOLDERS = \ # sort the above out so it is not done directory wise -bin_SCRIPTS = bin/isotovideo - pkglibexec_PROGRAMS = videoencoder videoencoder_SOURCES = videoencoder.cpp @@ -61,7 +63,6 @@ videoencoder_LDADD = $(OPENCV_LIBS) $(THEORAENC_LIBS) -lm EXTRA_DIST = \ autogen.sh \ - bin/isotovideo.in \ ppmclibs/tinycv.i \ $(backendhelpexec_SCRIPTS) $(backendexec_SCRIPTS) \ $(doc_DATA) $(pkglibexec_DATA) $(pkglibexec_SCRIPTS) $(packagestate_DATA_FOLDERS) $(pkglibexec_FOLDERS) diff --git a/README.asciidoc b/README.asciidoc index bf21f948837..c11ec06f7aa 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -41,7 +41,7 @@ used by the tests. A minimal vars.json file can be: Now we can launch the application with: -$ ../os-autoinst/start.pl +$ ../os-autoinst/isotovideo and we can use VNC to connect to the QEMU instance: diff --git a/bin/isotovideo.in b/bin/isotovideo.in deleted file mode 100644 index e57637db193..00000000000 --- a/bin/isotovideo.in +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh -exec_prefix="@prefix@" -exec "@libexecdir@/@PACKAGE@/tools/isotovideo" $@ diff --git a/configure.ac b/configure.ac index ff8ac24c0fe..822104e8239 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,5 @@ PKG_CHECK_MODULES([THEORAENC], [theoraenc >= 1.1]) AC_CONFIG_FILES([ Makefile t/Makefile - bin/isotovideo ]) AC_OUTPUT diff --git a/doc/needles.txt b/doc/needles.txt index b7f18261874..85b7b2465b0 100644 --- a/doc/needles.txt +++ b/doc/needles.txt @@ -1,11 +1,11 @@ Some packages are required to run crop.py. So for the first time do: zypper in python-imaging python-tk -To create needles or to adjust test cases the easiest way is to run start.pl +To create needles or to adjust test cases the easiest way is to run isotovideo interactively. Parameters for the installation are stored in environment -variables. You want to run start.pl in some empty directory with enough free +variables. You want to run isotovideo in some empty directory with enough free space left. Disk images, screenshots etc will be created relative to -the directory start.pl is called from. +the directory isotovideo is called from. Most important environment variables: - DISTRI: specifies which subdirectory of 'distri' should be used @@ -26,10 +26,10 @@ For development/debugging you also want regions of the needle to the new resolution. -Example how to run start.pl: +Example how to run isotovideo: $ mkdir /space/openqa $ cd /space/openqa/ -$ DISTRI=opensuse ISO=/path/to/dvd.iso DESKTOP=gnome interactive_crop=1 scaledhack=1 /path/to/start.pl +$ DISTRI=opensuse ISO=/path/to/dvd.iso DESKTOP=gnome interactive_crop=1 scaledhack=1 /path/to/isotovideo crop.py can be used to interactively edit needles. It takes a json file or a png as argument. diff --git a/start.pl b/isotovideo similarity index 95% rename from start.pl rename to isotovideo index d437debc463..429dbcdc31f 100755 --- a/start.pl +++ b/isotovideo @@ -8,9 +8,13 @@ use threads; BEGIN { + # the following line is modified during make install + my $installprefix = undef; + my ($wd) = $0 =~ m-(.*)/-; $wd ||= '.'; - unshift @INC, "$wd"; + $installprefix ||= $wd; + unshift @INC, "$installprefix"; } use bmwqemu qw(diag); diff --git a/tools/isotovideo b/tools/isotovideo deleted file mode 100755 index f6cedcefdf1..00000000000 --- a/tools/isotovideo +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -if test -z "$NAME" ; then - echo "\$NAME must be set!" >&2 - exit 1 -fi -scriptdir=$(dirname $(dirname $0)) -logfile=autoinst-log.txt - -echo testing $NAME -# cleanup -test -e qemu.pid && kill `cat qemu.pid` 2>/dev/null && rm -f qemu.pid -rm -f backend.run - -# start -TZ=UTC date "+%s%n%Y-%m-%d %H:%M:%S" > ${logfile} - -osautoinstpid= -exithandler() -{ - echo "isotovideo exit handler $osautoinstpid" >&2 - if [ -n "$osautoinstpid" ]; then - kill $osautoinstpid - fi -} -if [ -t 0 ]; then - 2> stderr.txt - exec 7> >(tee stderr.txt) -else - exec 7>stderr.txt -fi -trap exithandler EXIT -perl $scriptdir/start.pl 2>&7 & -osautoinstpid=$! -wait $! -echo "start.pl exited with status $?" -unset osautoinstpid - -test -e qemu.pid && kill `cat qemu.pid` 2>/dev/null && rm -f qemu.pid -rm -f backend.run -echo "QEMU finished, running final checks" >> ${logfile} - -echo "+++ STDERR +++" >> ${logfile} -cat stderr.txt >> ${logfile} - diff --git a/tools/precommitcheck b/tools/precommitcheck deleted file mode 100755 index 1d332ddaa9f..00000000000 --- a/tools/precommitcheck +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -for f in backend/* inst/* consoletest.d/*pm x11test.d/*.pm distri/opensuse/inst.d/*.pm bmwqemu.pm start.pl tools/inststagedetect.pl ; do perl -c $f ; done