test/source/unoapi_test.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit cdf292b4db54a82c181542927d3e7924adc286e0
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Wed Feb 25 22:55:55 2026 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Feb 26 18:22:21 2026 +0100

    Don't direct veraPDF stderr into output file
    
    This redirection was introduced in ba8fe774a1cfc1cc5be05ecc5175a7d020e5bd7a
    "test: capture stderr of odfvalidator too", so it probably doesn't make much
    sense for veraPDF.  And at least with Java 26, invocations of bin/verapdf.sh
    start off with writing
    
    > WARNING: Final field flavour in class 
org.verapdf.pdfa.validation.profiles.ValidationProfileImpl has been mutated 
reflectively by class 
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection in unnamed module 
@67117f44 (file:/home/sberg/lo-external-tarballs/verapdf-cli-1.29.0.jar)
    > WARNING: Use --enable-final-field-mutation=ALL-UNNAMED to avoid a warning
    > WARNING: Mutating final fields will be blocked in a future release unless 
final field mutation is enabled
    
    to stderr, so that e.g. CppunitTest_vcl_pdfexport failed with various
    
    > Entity: line 1: parser error : Start tag expected, '<' not found
    > WARNING: Final field flavour in class 
org.verapdf.pdfa.validation.profiles.Valid
    > ^
    > /home/sberg/lo/core/test/source/unoapi_test.cxx:217:(anonymous 
namespace)::testTdf142806::TestBody
    > assertion failed
    > - Expression: pXmlDoc
    
    Change-Id: I83970406d7ac8a4d4be98a7fc1e7da530075685c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200359
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index 1717b93cdf2e..fa54fddfde40 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -181,7 +181,11 @@ void UnoApiTest::validate(TestFilter eFilter)
     utl::TempFileNamed aOutput;
     aOutput.EnableKillingFile();
     OUString aOutputFile = aOutput.GetFileName();
-    OUString aCommand = aValidator + " " + maTempFile.GetFileName() + " > " + 
aOutputFile + " 2>&1";
+    OUString aCommand = aValidator + " " + maTempFile.GetFileName() + " > " + 
aOutputFile;
+    if (var != "VERAPDF")
+    {
+        aCommand += " 2>&1";
+    }
 
 #if !defined _WIN32
     // For now, this is only needed by some Linux ASan builds, so keep it 
simply and disable it on

Reply via email to