Use OFFICEOTRON/ODFVALIDATOR determined by configure
Change-Id: I456669f15a659e144fc6ecad053cd0b929859424
This commit is contained in:
parent
50c43b030b
commit
a40d0bdf72
@ -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@
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user