From 8c478c911033243df90ba290b32732a1fd70130e Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Fri, 25 Nov 2011 19:30:08 +0100 Subject: 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 --- smoketestoo_native/losmoketest | 61 ++++++++++++++++++++++++++++++++++++++++ smoketestoo_native/makefile.mk | 4 ++- smoketestoo_native/prj/build.lst | 2 +- smoketestoo_native/prj/d.lst | 3 ++ 4 files changed, 68 insertions(+), 2 deletions(-) create mode 100755 smoketestoo_native/losmoketest (limited to 'smoketestoo_native') 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 (initial developer) ] +# [ Copyright (C) 2011 Yifan Jiang ] +# +# 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.* -- cgit