summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-04-22 15:57:41 +0200
committerPetr Mladek <pmladek@suse.cz>2011-04-22 15:57:41 +0200
commit8e784936338edeaf20f48c93d5b87bfbf23c5472 (patch)
tree34c949576d2190e09e05e433102a96897fb08cb3
parentd1c8185b0d202a4d1faf5b480deaa1230d9a9f6e (diff)
testtool-more-defaults.diff: make testtool work out-of-the-box
tweaked existing defaults such that running testtool from inside a dev install works out-of-the-box. Additionally passing SRC_ROOT from build env to testtool
-rw-r--r--automation/source/testtool/objtest.cxx62
-rw-r--r--automation/source/testtool/testtool.ini1
2 files changed, 62 insertions, 1 deletions
diff --git a/automation/source/testtool/objtest.cxx b/automation/source/testtool/objtest.cxx
index 94866c5be..7c051421c 100644
--- a/automation/source/testtool/objtest.cxx
+++ b/automation/source/testtool/objtest.cxx
@@ -479,6 +479,68 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den
GetHostConfig();
GetTTPortConfig();
GetUnoPortConfig();
+
+ aConf.SetGroup("Crashreporter");
+
+ String aUP;
+ GETSET( aUP, "UseProxy", "false" );
+ String aPS;
+ GETSET( aPS, "ProxyServer", "" );
+ String aPP;
+ GETSET( aPP, "ProxyPort", "" );
+ String aAC;
+ GETSET( aAC, "AllowContact", "false" );
+ String aRA;
+ GETSET( aRA, "ReturnAddress", "" );
+
+ OUString sPath;
+ if( osl_getExecutableFile( (rtl_uString**)&sPath ) == osl_Process_E_None)
+ {
+ sPath = sPath.copy(7); // strip file://
+
+ int i = sPath.lastIndexOf('/');
+ if (i >= 0)
+ i = sPath.lastIndexOf('/', i-1 );
+
+ if (i >= 0)
+ {
+ sPath = sPath.copy(0, i);
+ ByteString bsPath( sPath.getStr(), sPath.getLength(),
+ RTL_TEXTENCODING_UTF8 );
+
+ aConf.SetGroup( "OOoProgramDir" );
+ String aOPD;
+ // testtool is installed in Basis3.x/program/ dir nowadays
+ bsPath += "/../program";
+ GETSET( aOPD, "Current", bsPath);
+
+ ByteString aSrcRoot(getenv("SRC_ROOT"));
+ aConf.SetGroup( "_profile_Default" );
+ if (aSrcRoot.Len())
+ {
+ String aPBD;
+ aSrcRoot += "/testautomation";
+ GETSET( aPBD, "BaseDir", aSrcRoot );
+
+ String aPHD;
+ aSrcRoot += "/global/hid";
+ GETSET( aPHD, "HIDDir", aSrcRoot );
+ }
+ else
+ {
+ String aPBD;
+ bsPath += "/qatesttool";
+ GETSET( aPBD, "BaseDir", bsPath );
+
+ String aPHD;
+ bsPath += "/global/hid";
+ GETSET( aPHD, "HIDDir", bsPath );
+ }
+
+ String aLD;
+ GETSET( aLD, "LogBaseDir", ByteString( "/tmp" ) );
+ }
+ }
}
#define MAKE_TT_KEYWORD( cName, aType, aResultType, nID ) \
diff --git a/automation/source/testtool/testtool.ini b/automation/source/testtool/testtool.ini
index ff2e43f5c..7b77654ee 100644
--- a/automation/source/testtool/testtool.ini
+++ b/automation/source/testtool/testtool.ini
@@ -9,7 +9,6 @@ CurrentProfile=_profile_Default
[OOoProgramDir]
Type=Path
-Current=.
[Crashreporter]
UseProxy=false