Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
73780435
Kaydet (Commit)
73780435
authored
Kas 03, 2012
tarafından
Norbert Thiebaud
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unottest: add get(URL|Path)FromWorkdir to locate $WORKDIR_FOR_BUILD
Change-Id: Iec4e609e023262f357a7552b75863aeae9385205
üst
b68a0f65
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
bootstrapfixturebase.hxx
unotest/inc/unotest/bootstrapfixturebase.hxx
+8
-0
bootstrapfixturebase.cxx
unotest/source/cpp/bootstrapfixturebase.cxx
+27
-0
No files found.
unotest/inc/unotest/bootstrapfixturebase.hxx
Dosyayı görüntüle @
73780435
...
...
@@ -57,6 +57,8 @@ protected:
::
rtl
::
OUString
m_aSrcRootPath
;
::
rtl
::
OUString
m_aSolverRootURL
;
::
rtl
::
OUString
m_aSolverRootPath
;
::
rtl
::
OUString
m_aWorkdirRootURL
;
::
rtl
::
OUString
m_aWorkdirRootPath
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
uno
::
XComponentContext
>
m_xContext
;
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
m_xSFactory
;
...
...
@@ -80,6 +82,12 @@ public:
// return a Path to a given c-str path from the source directory
::
rtl
::
OUString
getPathFromSrc
(
const
char
*
pPath
);
// return a URL to a given c-str path from the workdir directory
::
rtl
::
OUString
getURLFromWorkdir
(
const
char
*
pPath
);
// return a Path to a given c-str path from the workdir directory
::
rtl
::
OUString
getPathFromWorkdir
(
const
char
*
pPath
);
virtual
void
setUp
();
virtual
void
tearDown
();
...
...
unotest/source/cpp/bootstrapfixturebase.cxx
Dosyayı görüntüle @
73780435
...
...
@@ -50,21 +50,36 @@ test::BootstrapFixtureBase::BootstrapFixtureBase()
CPPUNIT_ASSERT_MESSAGE
(
"SRC_ROOT env variable not set"
,
pSrcRoot
!=
NULL
&&
pSrcRoot
[
0
]
!=
0
);
const
char
*
pSolverRoot
=
getenv
(
"OUTDIR_FOR_BUILD"
);
CPPUNIT_ASSERT_MESSAGE
(
"$OUTDIR_FOR_BUILD env variable not set"
,
pSolverRoot
!=
NULL
&&
pSolverRoot
[
0
]
!=
0
);
const
char
*
pWorkdirRoot
=
getenv
(
"WORKDIR_FOR_BUILD"
);
CPPUNIT_ASSERT_MESSAGE
(
"$WORKDIR_FOR_BUILD env variable not set"
,
pWorkdirRoot
!=
NULL
&&
pWorkdirRoot
[
0
]
!=
0
);
#ifdef WNT
if
(
pSrcRoot
[
1
]
==
':'
)
{
m_aSrcRootURL
+=
rtl
::
OUString
::
createFromAscii
(
"/"
);
}
if
(
pSolverRoot
[
1
]
==
':'
)
{
m_aSolverRootURL
+=
rtl
::
OUString
::
createFromAscii
(
"/"
);
}
if
(
pWorkdirRoot
[
1
]
==
':'
)
{
m_aWorkdirRootURL
+=
rtl
::
OUString
::
createFromAscii
(
"/"
);
}
#endif
#else
const
char
*
pSrcRoot
=
"/assets"
;
const
char
*
pSolverRoot
=
"/assets"
;
const
char
*
pWorkdirRoot
=
"/assets"
;
#endif
m_aSrcRootPath
=
rtl
::
OUString
::
createFromAscii
(
pSrcRoot
);
m_aSrcRootURL
+=
m_aSrcRootPath
;
m_aSolverRootPath
=
rtl
::
OUString
::
createFromAscii
(
pSolverRoot
);
m_aSolverRootURL
+=
m_aSolverRootPath
;
m_aWorkdirRootPath
=
rtl
::
OUString
::
createFromAscii
(
pWorkdirRoot
);
m_aWorkdirRootURL
+=
m_aWorkdirRootPath
;
}
test
::
BootstrapFixtureBase
::~
BootstrapFixtureBase
()
...
...
@@ -81,6 +96,18 @@ test::BootstrapFixtureBase::~BootstrapFixtureBase()
return
m_aSrcRootPath
+
rtl
::
OUString
::
createFromAscii
(
pPath
);
}
::
rtl
::
OUString
test
::
BootstrapFixtureBase
::
getURLFromWorkdir
(
const
char
*
pPath
)
{
return
m_aWorkdirRootURL
+
rtl
::
OUString
::
createFromAscii
(
pPath
);
}
::
rtl
::
OUString
test
::
BootstrapFixtureBase
::
getPathFromWorkdir
(
const
char
*
pPath
)
{
return
m_aWorkdirRootPath
+
rtl
::
OUString
::
createFromAscii
(
pPath
);
}
void
test
::
BootstrapFixtureBase
::
setUp
()
{
// set UserInstallation to user profile dir in test/user-template
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment