summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-20 16:47:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-20 16:48:32 +0200
commita40d0bdf72d914628ab609e3db8230e6472a9af3 (patch)
treede8d1750dcd44160d6e10209c232fc6d40b279eb
parent50c43b030b2911d83b2e8fc4bc0499b1641cb043 (diff)
Use OFFICEOTRON/ODFVALIDATOR determined by configure
Change-Id: I456669f15a659e144fc6ecad053cd0b929859424
-rw-r--r--config_host.mk.in2
-rw-r--r--configure.ac6
-rw-r--r--test/source/bootstrapfixture.cxx15
3 files changed, 18 insertions, 5 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index f1d22266dd4a..27422d30b198 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 77182cabf3f0..38e2beb57c1b 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 f6f100aefb3c..c27f22fb5c0b 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();