diff options
author | David Ostrovsky <david@ostrovsky.org> | 2012-09-19 22:13:36 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-09-20 09:48:29 +0000 |
commit | e0f90c3060f542885d834314a9097353d0cb2ba2 (patch) | |
tree | 375ff16a94c6bb03dcef4d085027f53458d67c01 | |
parent | b7c41f1d1fcabc8f4abc670d5a18546a117b540a (diff) |
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>
-rw-r--r-- | config_host.mk.in | 1 | ||||
-rw-r--r-- | configure.in | 17 | ||||
-rw-r--r-- | filter/Module_filter.mk | 2 | ||||
-rw-r--r-- | sc/CppunitTest_sc_filters_test.mk | 6 | ||||
-rw-r--r-- | sc/qa/unit/filters-test.cxx | 2 | ||||
-rw-r--r-- | sd/CppunitTest_sd_filters_test.mk | 6 | ||||
-rw-r--r-- | sd/qa/unit/filters-test.cxx | 2 | ||||
-rw-r--r-- | svtools/Module_svtools.mk | 2 | ||||
-rw-r--r-- | sw/Module_sw.mk | 7 |
9 files changed, 44 insertions, 1 deletions
diff --git a/config_host.mk.in b/config_host.mk.in index b6d1ce97ddc3..753c901cd94f 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -103,6 +103,7 @@ export DISABLE_EXTENSIONS=@DISABLE_EXTENSIONS@ export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@ export DISABLE_LINKOO=@DISABLE_LINKOO@ export DISABLE_NEON=@DISABLE_NEON@ +export DISABLE_CVE_TESTS=@DISABLE_CVE_TESTS@ export DISABLE_PYTHON=@DISABLE_PYTHON@ export DLLTOOL=@DLLTOOL@ export DMAKEROOT=@SRC_ROOT@/solenv/inc/startup diff --git a/configure.in b/configure.in index 10106724ee35..e29a0e84cf52 100644 --- a/configure.in +++ b/configure.in @@ -988,6 +988,11 @@ AC_ARG_ENABLE(neon, [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, AS_HELP_STRING([--enable-build-unowinreg], [Do not use the prebuilt unowinreg.dll. Build it instead. The MinGW C++ @@ -8623,6 +8628,18 @@ AC_SUBST([MINGW_TASN1_DLL]) 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 Check for system openssl dnl =================================================================== if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \ diff --git a/filter/Module_filter.mk b/filter/Module_filter.mk index 2a3ef798faca..b3ec2a3f19a0 100644 --- a/filter/Module_filter.mk +++ b/filter/Module_filter.mk @@ -80,11 +80,13 @@ $(eval $(call gb_Module_add_targets,filter,\ )) endif +ifneq ($(DISABLE_CVE_TESTS),TRUE) $(eval $(call gb_Module_add_check_targets,filter,\ CppunitTest_filter_pict_test \ CppunitTest_filter_tga_test \ CppunitTest_filter_tiff_test \ )) +endif # TODO #$(eval $(call gb_Module_add_subsequentcheck_targets,filter,\ diff --git a/sc/CppunitTest_sc_filters_test.mk b/sc/CppunitTest_sc_filters_test.mk index 37a4b14aaa97..ef47365af404 100644 --- a/sc/CppunitTest_sc_filters_test.mk +++ b/sc/CppunitTest_sc_filters_test.mk @@ -31,6 +31,12 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sc_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, \ mdds_headers \ orcus \ diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index dc6df6dab188..a7b050d24b71 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -196,6 +196,7 @@ void ScFiltersTest::createCSVPath(const rtl::OUString& aFileBase, rtl::OUString& void ScFiltersTest::testCVEs() { +#ifndef DISABLE_CVE_TESTS testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")), getURLFromSrc("/sc/qa/unit/data/qpro/"), rtl::OUString()); @@ -207,6 +208,7 @@ void ScFiltersTest::testCVEs() testDir(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MS Excel 97")), getURLFromSrc("/sc/qa/unit/data/xls/"), rtl::OUString()); +#endif } #if TEST_BUG_FILES diff --git a/sd/CppunitTest_sd_filters_test.mk b/sd/CppunitTest_sd_filters_test.mk index 6afe52d4d79d..439423076efb 100644 --- a/sd/CppunitTest_sd_filters_test.mk +++ b/sd/CppunitTest_sd_filters_test.mk @@ -33,6 +33,12 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sd_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, \ avmedia \ basegfx \ diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx index b5ae8032cc63..76fd560f9486 100644 --- a/sd/qa/unit/filters-test.cxx +++ b/sd/qa/unit/filters-test.cxx @@ -196,9 +196,11 @@ bool SdFiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL void SdFiltersTest::testCVEs() { +#ifndef DISABLE_CVE_TESTS testDir(rtl::OUString("MS PowerPoint 97"), getURLFromSrc("/sd/qa/unit/data/ppt/"), rtl::OUString("sdfilt")); +#endif } SdFiltersTest::SdFiltersTest() diff --git a/svtools/Module_svtools.mk b/svtools/Module_svtools.mk index c7f1122b3b4e..bfefee30d666 100644 --- a/svtools/Module_svtools.mk +++ b/svtools/Module_svtools.mk @@ -50,9 +50,11 @@ endif endif +ifneq ($(DISABLE_CVE_TESTS),TRUE) $(eval $(call gb_Module_add_check_targets,svtools,\ CppunitTest_svtools_filters_test \ )) +endif $(eval $(call gb_Module_add_subsequentcheck_targets,svtools,\ JunitTest_svtools_unoapi \ diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index 2e3ffbfec003..76c8e1574bf2 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -50,7 +50,6 @@ $(eval $(call gb_Module_add_check_targets,sw,\ )) $(eval $(call gb_Module_add_slowcheck_targets,sw,\ - CppunitTest_sw_filters_test \ CppunitTest_sw_macros_test \ CppunitTest_sw_subsequent_ooxmlexport \ CppunitTest_sw_subsequent_ooxmlimport \ @@ -62,6 +61,12 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ 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,\ JunitTest_sw_complex \ JunitTest_sw_unoapi \ |