introduce new option --disable-cve-tests

Change-Id: I288638c4a70396ccb7354b20e901aa0c46ffe442
Reviewed-on: https://gerrit.libreoffice.org/653
Reviewed-by: Michael Meeks <michael.meeks@suse.com>
Tested-by: Michael Meeks <michael.meeks@suse.com>
This commit is contained in:
David Ostrovsky
2012-09-19 22:13:36 +02:00
committed by Michael Meeks
parent b7c41f1d1f
commit e0f90c3060
9 changed files with 44 additions and 1 deletions

View File

@@ -103,6 +103,7 @@ export DISABLE_EXTENSIONS=@DISABLE_EXTENSIONS@
export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@ export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@
export DISABLE_LINKOO=@DISABLE_LINKOO@ export DISABLE_LINKOO=@DISABLE_LINKOO@
export DISABLE_NEON=@DISABLE_NEON@ export DISABLE_NEON=@DISABLE_NEON@
export DISABLE_CVE_TESTS=@DISABLE_CVE_TESTS@
export DISABLE_PYTHON=@DISABLE_PYTHON@ export DISABLE_PYTHON=@DISABLE_PYTHON@
export DLLTOOL=@DLLTOOL@ export DLLTOOL=@DLLTOOL@
export DMAKEROOT=@SRC_ROOT@/solenv/inc/startup export DMAKEROOT=@SRC_ROOT@/solenv/inc/startup

View File

@@ -988,6 +988,11 @@ AC_ARG_ENABLE(neon,
[Disable neon and the compilation of webdav binding.]), [Disable neon and the compilation of webdav binding.]),
,) ,)
AC_ARG_ENABLE(cve-tests,
AS_HELP_STRING([--disable-cve-tests],
[Prevent CVE tests to be executed]),
,)
AC_ARG_ENABLE(build-unowinreg, AC_ARG_ENABLE(build-unowinreg,
AS_HELP_STRING([--enable-build-unowinreg], AS_HELP_STRING([--enable-build-unowinreg],
[Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++ [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++
@@ -8622,6 +8627,18 @@ AC_SUBST([MINGW_NEON_DLL])
AC_SUBST([MINGW_TASN1_DLL]) AC_SUBST([MINGW_TASN1_DLL])
fi fi
dnl ===================================================================
dnl Check for disabling cve_tests
dnl ===================================================================
AC_MSG_CHECKING([whether to execute CVE tests])
if test "$enable_cve_tests" = "no"; then
AC_MSG_RESULT([no])
DISABLE_CVE_TESTS=TRUE
AC_SUBST(DISABLE_CVE_TESTS)
else
AC_MSG_RESULT([yes])
fi
dnl =================================================================== dnl ===================================================================
dnl Check for system openssl dnl Check for system openssl
dnl =================================================================== dnl ===================================================================

View File

@@ -80,11 +80,13 @@ $(eval $(call gb_Module_add_targets,filter,\
)) ))
endif endif
ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_check_targets,filter,\ $(eval $(call gb_Module_add_check_targets,filter,\
CppunitTest_filter_pict_test \ CppunitTest_filter_pict_test \
CppunitTest_filter_tga_test \ CppunitTest_filter_tga_test \
CppunitTest_filter_tiff_test \ CppunitTest_filter_tiff_test \
)) ))
endif
# TODO # TODO
#$(eval $(call gb_Module_add_subsequentcheck_targets,filter,\ #$(eval $(call gb_Module_add_subsequentcheck_targets,filter,\

View File

@@ -31,6 +31,12 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_filters_test, \
sc/qa/unit/filters-test \ sc/qa/unit/filters-test \
)) ))
ifeq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_CppunitTest_add_defs,sc_filters_test,\
-DDISABLE_CVE_TESTS \
))
endif
$(eval $(call gb_CppunitTest_use_externals,sc_filters_test, \ $(eval $(call gb_CppunitTest_use_externals,sc_filters_test, \
mdds_headers \ mdds_headers \
orcus \ orcus \

View File

@@ -196,6 +196,7 @@ void ScFiltersTest::createCSVPath(const rtl::OUString& aFileBase, rtl::OUString&
void ScFiltersTest::testCVEs() void ScFiltersTest::testCVEs()
{ {
#ifndef DISABLE_CVE_TESTS
testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")), testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")),
getURLFromSrc("/sc/qa/unit/data/qpro/"), rtl::OUString()); getURLFromSrc("/sc/qa/unit/data/qpro/"), rtl::OUString());
@@ -207,6 +208,7 @@ void ScFiltersTest::testCVEs()
testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Excel 97")), testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Excel 97")),
getURLFromSrc("/sc/qa/unit/data/xls/"), rtl::OUString()); getURLFromSrc("/sc/qa/unit/data/xls/"), rtl::OUString());
#endif
} }
#if TEST_BUG_FILES #if TEST_BUG_FILES

View File

@@ -33,6 +33,12 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sd_filters_test, \
sd/qa/unit/filters-test \ sd/qa/unit/filters-test \
)) ))
ifeq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_CppunitTest_add_defs,sd_filters_test,\
-DDISABLE_CVE_TESTS \
))
endif
$(eval $(call gb_CppunitTest_use_libraries,sd_filters_test, \ $(eval $(call gb_CppunitTest_use_libraries,sd_filters_test, \
avmedia \ avmedia \
basegfx \ basegfx \

View File

@@ -196,9 +196,11 @@ bool SdFiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL
void SdFiltersTest::testCVEs() void SdFiltersTest::testCVEs()
{ {
#ifndef DISABLE_CVE_TESTS
testDir(rtl::OUString("MS PowerPoint 97"), testDir(rtl::OUString("MS PowerPoint 97"),
getURLFromSrc("/sd/qa/unit/data/ppt/"), getURLFromSrc("/sd/qa/unit/data/ppt/"),
rtl::OUString("sdfilt")); rtl::OUString("sdfilt"));
#endif
} }
SdFiltersTest::SdFiltersTest() SdFiltersTest::SdFiltersTest()

View File

@@ -50,9 +50,11 @@ endif
endif endif
ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_check_targets,svtools,\ $(eval $(call gb_Module_add_check_targets,svtools,\
CppunitTest_svtools_filters_test \ CppunitTest_svtools_filters_test \
)) ))
endif
$(eval $(call gb_Module_add_subsequentcheck_targets,svtools,\ $(eval $(call gb_Module_add_subsequentcheck_targets,svtools,\
JunitTest_svtools_unoapi \ JunitTest_svtools_unoapi \

View File

@@ -50,7 +50,6 @@ $(eval $(call gb_Module_add_check_targets,sw,\
)) ))
$(eval $(call gb_Module_add_slowcheck_targets,sw,\ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_filters_test \
CppunitTest_sw_macros_test \ CppunitTest_sw_macros_test \
CppunitTest_sw_subsequent_ooxmlexport \ CppunitTest_sw_subsequent_ooxmlexport \
CppunitTest_sw_subsequent_ooxmlimport \ CppunitTest_sw_subsequent_ooxmlimport \
@@ -62,6 +61,12 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_subsequent_odfimport \ CppunitTest_sw_subsequent_odfimport \
)) ))
ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_filters_test \
))
endif
$(eval $(call gb_Module_add_subsequentcheck_targets,sw,\ $(eval $(call gb_Module_add_subsequentcheck_targets,sw,\
JunitTest_sw_complex \ JunitTest_sw_complex \
JunitTest_sw_unoapi \ JunitTest_sw_unoapi \