1 Make testtool run out-of-the-box in ooenv-ed env
3 From: Thorsten Behrens <thb@openoffice.org>
8 automation/source/testtool/objtest.cxx | 63 +++++++++++++++++++++++++++++++
9 automation/source/testtool/testtool.ini | 1
11 3 files changed, 64 insertions(+), 1 deletions(-)
14 diff --git automation/source/testtool/objtest.cxx automation/source/testtool/objtest.cxx
15 index dceb0fa..f3f6e33 100644
16 --- automation/source/testtool/objtest.cxx
17 +++ automation/source/testtool/objtest.cxx
18 @@ -531,6 +531,68 @@ void TestToolObj::LoadIniFile() // Laden der IniEinstellungen, die durch den
23 + aConf.SetGroup("Crashreporter");
26 + GETSET( aUP, "UseProxy", "false" );
28 + GETSET( aPS, "ProxyServer", "" );
30 + GETSET( aPP, "ProxyPort", "" );
32 + GETSET( aAC, "AllowContact", "false" );
34 + GETSET( aRA, "ReturnAddress", "" );
37 + if( osl_getExecutableFile( (rtl_uString**)&sPath ) == osl_Process_E_None)
39 + sPath = sPath.copy(7); // strip file://
41 + int i = sPath.lastIndexOf('/');
43 + i = sPath.lastIndexOf('/', i-1 );
47 + sPath = sPath.copy(0, i);
48 + ByteString bsPath( sPath.getStr(), sPath.getLength(),
49 + RTL_TEXTENCODING_UTF8 );
51 + aConf.SetGroup( "OOoProgramDir" );
53 + // testtool is installed in Basis3.x/program/ dir nowadays
54 + bsPath += "/../program";
55 + GETSET( aOPD, "Current", bsPath);
57 + ByteString aSrcRoot(getenv("SRC_ROOT"));
58 + aConf.SetGroup( "_profile_Default" );
62 + aSrcRoot += "/testautomation";
63 + GETSET( aPBD, "BaseDir", aSrcRoot );
66 + aSrcRoot += "/global/hid";
67 + GETSET( aPHD, "HIDDir", aSrcRoot );
72 + bsPath += "/qatesttool";
73 + GETSET( aPBD, "BaseDir", bsPath );
76 + bsPath += "/global/hid";
77 + GETSET( aPHD, "HIDDir", bsPath );
81 + GETSET( aLD, "LogBaseDir", ByteString( "/tmp" ) );
86 #define MAKE_TT_KEYWORD( cName, aType, aResultType, nID ) \
87 diff --git automation/source/testtool/testtool.ini automation/source/testtool/testtool.ini
88 index bf1b54c..58fa92e 100644
89 --- automation/source/testtool/testtool.ini
90 +++ automation/source/testtool/testtool.ini
91 @@ -9,7 +9,6 @@ CurrentProfile=_profile_Default
99 diff --git solenv/bin/linkoo solenv/bin/linkoo
100 index 659d473..a4615d5 100755
101 --- solenv/bin/linkoo
102 +++ solenv/bin/linkoo
103 @@ -372,6 +372,7 @@ if (!-f "$OOO_INSTALL/" . $brand_program_dir . "/ooenv") {
104 print "Creating '$OOO_INSTALL/", $brand_program_dir, "/ooenv'\n";
105 open ($ooenv, ">$OOO_INSTALL/" . $brand_program_dir . "/ooenv") || die "Can't open $OOO_INSTALL/" . $brand_program_dir . "/ooenv: $!";
106 print $ooenv $env_script;
107 + print $ooenv "# testtool\nexport SRC_ROOT=$OOO_BUILD\n";