Kaydet (Commit) a40d0bdf authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Use OFFICEOTRON/ODFVALIDATOR determined by configure

Change-Id: I456669f15a659e144fc6ecad053cd0b929859424
üst 50c43b03
...@@ -429,6 +429,8 @@ export nodep=@nodep@ ...@@ -429,6 +429,8 @@ export nodep=@nodep@
export OBJDUMP=@OBJDUMP@ export OBJDUMP=@OBJDUMP@
export ODFGEN_CFLAGS=$(gb_SPACE)@ODFGEN_CFLAGS@ export ODFGEN_CFLAGS=$(gb_SPACE)@ODFGEN_CFLAGS@
export ODFGEN_LIBS=$(gb_SPACE)@ODFGEN_LIBS@ export ODFGEN_LIBS=$(gb_SPACE)@ODFGEN_LIBS@
export ODFVALIDATOR=@ODFVALIDATOR@
export OFFICEOTRON=@OFFICEOTRON@
export OOOP_FONTS_PACK=@OOOP_FONTS_PACK@ export OOOP_FONTS_PACK=@OOOP_FONTS_PACK@
export OOOP_GALLERY_PACK=@OOOP_GALLERY_PACK@ export OOOP_GALLERY_PACK=@OOOP_GALLERY_PACK@
export OOOP_SAMPLES_PACK=@OOOP_SAMPLES_PACK@ export OOOP_SAMPLES_PACK=@OOOP_SAMPLES_PACK@
......
...@@ -2731,12 +2731,14 @@ if test "$with_export_validation" = yes; then ...@@ -2731,12 +2731,14 @@ if test "$with_export_validation" = yes; then
AC_CHECK_PROGS(ODFVALIDATOR, odfvalidator) AC_CHECK_PROGS(ODFVALIDATOR, odfvalidator)
if test -z "$ODFVALIDATOR"; then 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 fi
AC_SUBST(ODFVALIDATOR)
AC_CHECK_PROGS(OFFICEOTRON, officeotron) AC_CHECK_PROGS(OFFICEOTRON, officeotron)
if test -z "$OFFICEOTRON"; then 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 fi
AC_SUBST(OFFICEOTRON)
else else
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
fi fi
......
...@@ -156,15 +156,24 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor ...@@ -156,15 +156,24 @@ void test::BootstrapFixture::validate(const OUString& rPath, test::ValidationFor
(void)eFormat; (void)eFormat;
#if HAVE_EXPORT_VALIDATION #if HAVE_EXPORT_VALIDATION
OUString aValidator; OUString var;
if( eFormat == test::OOXML ) if( eFormat == test::OOXML )
{ {
aValidator = "officeotron "; var = "OFFICEOTRON";
} }
else 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; utl::TempFile aOutput;
aOutput.EnableKillingFile(); aOutput.EnableKillingFile();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment