[Libreoffice-commits] dev-tools.git: test-bugzilla-files/config test-bugzilla-files/config.asan test-bugzilla-files/execute_asan.sh test-bugzilla-files/execute.sh test-bugzilla-files/test-bugzilla-files.py

Michael Stahl mstahl at redhat.com
Tue Sep 13 17:30:03 UTC 2016


 test-bugzilla-files/config                 |    3 +++
 test-bugzilla-files/config.asan            |    3 +++
 test-bugzilla-files/execute.sh             |    8 +++++---
 test-bugzilla-files/execute_asan.sh        |    8 +++++---
 test-bugzilla-files/test-bugzilla-files.py |    3 ++-
 5 files changed, 18 insertions(+), 7 deletions(-)

New commits:
commit 347c1b16822777871f3d8dacca4befa95eeb805d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Aug 12 13:39:02 2016 +0200

    test-bugzilla-files: make paths configurable in "config" file
    
    So we can invoke "python3 new-control.py /docpool" after editing config.
    
    Change-Id: Iae52ee9722882cc0d63dc62efc1ab1352a815866
    Reviewed-on: https://gerrit.libreoffice.org/28083
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/test-bugzilla-files/config b/test-bugzilla-files/config
new file mode 100644
index 0000000..c2d51dd
--- /dev/null
+++ b/test-bugzilla-files/config
@@ -0,0 +1,3 @@
+export CRASHTESTDATA=/srv/crashtestdata
+export INSTDIR=/home/buildslave/build/instdir
+export USERDIR=/home/buildslave/.config
diff --git a/test-bugzilla-files/config.asan b/test-bugzilla-files/config.asan
new file mode 100644
index 0000000..88c8bec
--- /dev/null
+++ b/test-bugzilla-files/config.asan
@@ -0,0 +1,3 @@
+export CRASHTESTDATA=/srv/crashtestdata
+export INSTDIR=/srv/crashtestdata/asan-build/instdir/program
+export USERDIR=/home/buildslave/.config
diff --git a/test-bugzilla-files/execute.sh b/test-bugzilla-files/execute.sh
index 46c1bd9..0595156 100755
--- a/test-bugzilla-files/execute.sh
+++ b/test-bugzilla-files/execute.sh
@@ -1,5 +1,7 @@
 dir_name=$(basename $1)
-mkdir /srv/crashtestdata/control/$dir_name
-cd /srv/crashtestdata/control/$dir_name
-TMPDIR=/srv/crashtestdata/tmpdir /home/buildslave/build/instdir/program/python /home/buildslave/source/dev-tools/test-bugzilla-files/test-bugzilla-files.py --soffice=path:/home/buildslave/build/instdir/program/soffice --userdir=file:///home/buildslave/.config/libreoffice_$dir_name/4 $1 2>&1 | tee /srv/crashtestdata/console_$dir_name.log
+dir=${PWD}
+source ${dir}/config
+mkdir -p ${CRASHTESTDATA}/control/$dir_name
+cd ${CRASHTESTDATA}/control/$dir_name
+TMPDIR=${CRASHTESTDATA}/tmpdir ${INSTDIR}/program/python ${dir}/test-bugzilla-files.py --soffice=path:${INSTDIR}/program/soffice --userdir=file://${USERDIR}/libreoffice_$dir_name/4 $1 2>&1 | tee ${CRASHTESTDATA}/console_$dir_name.log
 rm core*
diff --git a/test-bugzilla-files/execute_asan.sh b/test-bugzilla-files/execute_asan.sh
index 6665e00..2d465bb 100755
--- a/test-bugzilla-files/execute_asan.sh
+++ b/test-bugzilla-files/execute_asan.sh
@@ -1,5 +1,7 @@
 dir_name=$(basename $1)
-mkdir /srv/crashtestdata/control/$dir_name
-cd /srv/crashtestdata/control/$dir_name
-TMPDIR=/srv/crashtestdata/tmpdir /srv/crashtestdata/asan-build/instdir/program/python /home/buildslave/source/dev-tools/test-bugzilla-files/test-bugzilla-files.py --asan --soffice=path:/srv/crashtestdata/asan-build/instdir/program/soffice --userdir=file:///home/buildslave/.config/libreoffice_$dir_name/4 $1 2>&1 | tee /srv/crashtestdata/console_$dir_name.log
+dir=${PWD}
+source ${dir}/config.asan
+mkdir ${CRASHTESTDATA}/control/$dir_name
+cd ${CRASHTESTDATA}/control/$dir_name
+TMPDIR=${CRASHTESTDATA}/tmpdir ${INSTDIR}/program/python ${dir}/test-bugzilla-files.py --asan --soffice=path:${INSTDIR}/program/soffice --userdir=file://${USERDIR}/libreoffice_$dir_name/4 $1 2>&1 | tee ${CRASHTESTDATA}/console_$dir_name.log
 rm core*
diff --git a/test-bugzilla-files/test-bugzilla-files.py b/test-bugzilla-files/test-bugzilla-files.py
index b71a6e4..d48d56b 100644
--- a/test-bugzilla-files/test-bugzilla-files.py
+++ b/test-bugzilla-files/test-bugzilla-files.py
@@ -352,7 +352,8 @@ def exportDoc(xDoc, filterName, validationCommand, filename, connection, timer):
                     }
     base = os.path.splitext(filename)[0]
     filename = base + extensions[filterName]
-    fileURL = "file:///srv/crashtestdata/current" + filename
+    # note: avoid empty path segments in the url!
+    fileURL = "file://" + os.path.normpath(os.environ["CRASHTESTDATA"] + "/" + filename)
     t = None
     try:
         args = [connection]


More information about the Libreoffice-commits mailing list