summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2009-12-29 17:40:56 -0500
committerKohei Yoshida <kyoshida@novell.com>2009-12-29 17:40:56 -0500
commit6697608dfb4865cb0145449b141a7ce685dd97ff (patch)
treec8ae610c92925b4b1be67fc3bbb5b9341e81c9bb
parent02b795710f2ba0445bac89f344a33b947837e63f (diff)
Run xls-dump on control xls files after the duplication is done.
-rw-r--r--configure.ac6
-rwxr-xr-xrun-test.sh.in16
-rw-r--r--setenv.sh.in4
3 files changed, 23 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 51cb8e8..2459047 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,12 @@ AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
[AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
AC_LANG_RESTORE
+AC_PATH_PROG(PYTHON, python)
+if test -z "PYTHON"; then
+ AC_MSG_ERROR([python not found in your path.])
+fi
+AC_SUBST(PYTHON)
+
ROOTDIR=`pwd`
AC_SUBST(ROOTDIR)
diff --git a/run-test.sh.in b/run-test.sh.in
index 5aadd29..152839b 100755
--- a/run-test.sh.in
+++ b/run-test.sh.in
@@ -1,8 +1,22 @@
#!/bin/bash
+dump_files() {
+ for file in $(ls "$1"); do
+ filepath="$1/$file"
+ fileext=$(echo "$filepath" | sed -e 's/.*\.//g')
+ if test $fileext != "xls"; then
+ continue
+ fi
+ dumppath=$(echo "$filepath" | sed -e 's/\.xls$/\.log/g')
+ @PYTHON@ "$XLS_DUMP_PATH" "$filepath" > "$dumppath"
+ done
+}
+
export LD_LIBRARY_PATH=@OOO_INSTALL_PATH@/program:@OOO_INSTALL_PATH@/ure/lib
source @ROOTDIR@/setenv.sh
mkdir "$CTRL_XLS_OUT_DIR" 2>/dev/null || /bin/true
cd @OOO_INSTALL_PATH@/ure/lib
-@EXECDIR@/run-soffice
+@EXECDIR@/run-soffice || exit 1
+dump_files "$CTRL_XLS_IN_DIR"
+dump_files "$CTRL_XLS_OUT_DIR"
diff --git a/setenv.sh.in b/setenv.sh.in
index 671ae97..9e794c0 100644
--- a/setenv.sh.in
+++ b/setenv.sh.in
@@ -1,4 +1,4 @@
CTRL_XLS_IN_DIR=@ROOTDIR@/control-import
CTRL_XLS_OUT_DIR=@ROOTDIR@/control-export
-
-export CTRL_XLS_IN_DIR CTRL_XLS_OUT_DIR
+XLS_DUMP_PATH=@XLS_DUMP_PATH@
+export CTRL_XLS_IN_DIR CTRL_XLS_OUT_DIR XLS_DUMP_PATH