[Libreoffice-commits] core.git: config_host.mk.in configure.ac test/source
Stephan Bergmann
sbergman at redhat.com
Mon Apr 20 07:51:30 PDT 2015
config_host.mk.in | 2 ++
configure.ac | 6 ++++--
test/source/bootstrapfixture.cxx | 15 ++++++++++++---
3 files changed, 18 insertions(+), 5 deletions(-)
New commits:
commit a40d0bdf72d914628ab609e3db8230e6472a9af3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Apr 20 16:47:53 2015 +0200
Use OFFICEOTRON/ODFVALIDATOR determined by configure
Change-Id: I456669f15a659e144fc6ecad053cd0b929859424
diff --git a/config_host.mk.in b/config_host.mk.in
index f1d2226..27422d3 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -429,6 +429,8 @@ export nodep=@nodep@
export OBJDUMP=@OBJDUMP@
export ODFGEN_CFLAGS=$(gb_SPACE)@ODFGEN_CFLAGS@
export ODFGEN_LIBS=$(gb_SPACE)@ODFGEN_LIBS@
+export ODFVALIDATOR=@ODFVALIDATOR@
+export OFFICEOTRON=@OFFICEOTRON@
export OOOP_FONTS_PACK=@OOOP_FONTS_PACK@
export OOOP_GALLERY_PACK=@OOOP_GALLERY_PACK@
export OOOP_SAMPLES_PACK=@OOOP_SAMPLES_PACK@
diff --git a/configure.ac b/configure.ac
index 77182ca..38e2beb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2731,12 +2731,14 @@ if test "$with_export_validation" = yes; then
AC_CHECK_PROGS(ODFVALIDATOR, odfvalidator)
if test -z "$ODFVALIDATOR"; then
- AC_MSG_ERROR([odfvalidator is not found in PATH, but required by --with-export-validation])
+ AC_MSG_ERROR([odfvalidator not found, but required by --with-export-validation])
fi
+ AC_SUBST(ODFVALIDATOR)
AC_CHECK_PROGS(OFFICEOTRON, officeotron)
if test -z "$OFFICEOTRON"; then
- AC_MSG_ERROR([officeotron is not found in PATH, but required by --with-export-validation])
+ AC_MSG_ERROR([officeotron not found, but required by --with-export-validation])
fi
+ AC_SUBST(OFFICEOTRON)
else
AC_MSG_RESULT([no])
fi
diff --git a/test/source/bootstrapfixture.cxx b/test/source/bootstrapfixture.cxx
index f6f100a..c27f22f 100644
--- a/test/source/bootstrapfixture.cxx
+++ b/test/source/bootstrapfixture.cxx
@@ -156,15 +156,24 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
(void)eFormat;
#if HAVE_EXPORT_VALIDATION
- OUString aValidator;
+ OUString var;
if( eFormat == test::OOXML )
{
- aValidator = "officeotron ";
+ var = "OFFICEOTRON";
}
else
{
- aValidator = "odfvalidator ";
+ var = "ODFVALIDATOR";
}
+ OUString aValidator;
+ oslProcessError e = osl_getEnvironment(var.pData, &aValidator.pData);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(
+ OUString("cannot get env var " + var).toUtf8().getStr(),
+ osl_Process_E_None, e);
+ CPPUNIT_ASSERT_MESSAGE(
+ OUString("empty get env var " + var).toUtf8().getStr(),
+ !aValidator.isEmpty());
+ aValidator += " ";
utl::TempFile aOutput;
aOutput.EnableKillingFile();
More information about the Libreoffice-commits
mailing list