summaryrefslogtreecommitdiff
path: root/smoketestoo_native
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2011-11-25 19:30:08 +0100
committerPetr Mladek <pmladek@suse.cz>2011-12-01 21:16:47 +0100
commit8c478c911033243df90ba290b32732a1fd70130e (patch)
tree98f031b9428103aca8dff385681c0a633a41d382 /smoketestoo_native
parent86adb5cacb4fe3e7fb869299447da5876f0da30d (diff)
create installation set for tests
+ it currently includes just the smoketest and is available only for Linux + the side effect is that it builds the smoketest before instsetoo_native + it runs it only during dev-install when the variable RUN_SMOKETEST == YES
Diffstat (limited to 'smoketestoo_native')
-rwxr-xr-xsmoketestoo_native/losmoketest61
-rwxr-xr-xsmoketestoo_native/makefile.mk4
-rw-r--r--smoketestoo_native/prj/build.lst2
-rw-r--r--smoketestoo_native/prj/d.lst3
4 files changed, 68 insertions, 2 deletions
diff --git a/smoketestoo_native/losmoketest b/smoketestoo_native/losmoketest
new file mode 100755
index 000000000000..b3faee16b817
--- /dev/null
+++ b/smoketestoo_native/losmoketest
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# [ Copyright (C) 2011 Petr Mladek <pmladek@suse.cz> (initial developer) ]
+# [ Copyright (C) 2011 Yifan Jiang <yfjiang@suse.com> ]
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+
+# resolve installation directory
+sd_cwd=`pwd`
+sd_res=$0
+while [ -h "$sd_res" ] ; do
+ cd "`dirname "$sd_res"`"
+ sd_basename=`basename "$sd_res"`
+ sd_res=`ls -l "$sd_basename" | sed "s/.*$sd_basename -> //g"`
+done
+cd "`dirname "$sd_res"`"
+sd_prog=`pwd`
+cd "$sd_cwd"
+
+user_conf_dir=`grep UserInstallation $sd_prog/bootstraprc | sed -e "s|UserInstallation=||" -e "s|\\$SYSUSERCONFIG|$HOME/.config|"`
+
+case "`uname -s`" in
+Linux)
+ sd_prog1="$sd_prog"
+ sd_prog2="$sd_prog/../ure/lib"
+ LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ export LD_LIBRARY_PATH
+ ;;
+esac
+
+exec $sd_prog/cppunittester \
+ -env:UNO_SERVICES=file://$sd_prog/../ure/share/misc/services.rdb \
+ -env:UNO_TYPES=file://$sd_prog/../ure/share/misc/test/types.rdb \
+ -env:arg-soffice=path:$sd_prog/soffice \
+ -env:arg-user=$user_conf_dir \
+ -env:arg-env=$LD_LIBRARY_PATH \
+ -env:arg-testarg.smoketest.doc=$sd_prog/../share/test/smoketestdoc.sxw \
+ --protector $sd_prog/unoexceptionprotector.so unoexceptionprotector \
+ $sd_prog/libsmoketest.so
diff --git a/smoketestoo_native/makefile.mk b/smoketestoo_native/makefile.mk
index eceea553b45f..333d646dcab3 100755
--- a/smoketestoo_native/makefile.mk
+++ b/smoketestoo_native/makefile.mk
@@ -49,10 +49,12 @@ DEF1NAME = $(SHL1TARGET)
.INCLUDE: target.mk
.INCLUDE: installationtest.mk
-.IF "$(depend)" == ""
+.IF "$(depend)" == "" && "$(RUN_SMOKETEST)" == "YES"
# disable smoketest when cross-compiling for now; we can use wine at some stage (?)
.IF "$(CROSS_COMPILING)" != "YES"
ALLTAR : cpptest
+.ELSE
+ALLTAR :
.END
.END
diff --git a/smoketestoo_native/prj/build.lst b/smoketestoo_native/prj/build.lst
index e7afaaacb8e5..45439a1f0e87 100644
--- a/smoketestoo_native/prj/build.lst
+++ b/smoketestoo_native/prj/build.lst
@@ -1,4 +1,4 @@
-smtoon smoketestoo_native :: codemaker instsetoo_native javaunohelper soltools test unoil NULL
+smtoon smoketestoo_native :: codemaker javaunohelper soltools test unoil NULL
smtoon smoketestoo_native\com\sun\star\comp\smoketest nmake - all smoketestoonative_com_sun_star_comp_smoketest NULL
smtoon smoketestoo_native\data nmake - all smoketestoonative_data NULL
smtoon smoketestoo_native nmake - all smoketestoonative_mk smoketestoonative_com_sun_star_comp_smoketest smoketestoonative_data NULL
diff --git a/smoketestoo_native/prj/d.lst b/smoketestoo_native/prj/d.lst
index e69de29bb2d1..92eb2818fd2c 100644
--- a/smoketestoo_native/prj/d.lst
+++ b/smoketestoo_native/prj/d.lst
@@ -0,0 +1,3 @@
+..\losmoketest %_DEST%\bin\losmoketest
+..\%__SRC%\bin\smoketestdoc.sxw %_DEST%\bin\smoketestdoc.sxw
+..\%__SRC%\lib\libsmoketest.* %_DEST%\lib\libsmoketest.*