From c32e889bf844a90dbf76fccd856849e979941b2e Mon Sep 17 00:00:00 2001
From: Marco Clemencic <marco.clemencic@cern.ch>
Date: Fri, 20 Jan 2023 18:21:36 +0100
Subject: [PATCH] Update test reference files

---
 .../qmtest/gaudiexamples.qms/aida2rootex.qmt      |  5 ++---
 .../gaudiexamples.qms/jira.qms/gaudi_971.qmt      |  3 +--
 .../return_codes.qms/input_file.qmt               | 15 ++++++---------
 .../tests/qmtest/refs/Aida2RootEx.err.ref         |  0
 GaudiExamples/tests/qmtest/refs/Aida2RootEx.ref   | 12 ++++++++++++
 .../tests/qmtest/refs/jira/gaudi_971.err.ref      |  1 -
 .../tests/qmtest/refs/jira/gaudi_971.ref          |  1 +
 .../qmtest/refs/return_codes/input_file.err.ref   |  1 -
 8 files changed, 22 insertions(+), 16 deletions(-)
 delete mode 100644 GaudiExamples/tests/qmtest/refs/Aida2RootEx.err.ref
 delete mode 100644 GaudiExamples/tests/qmtest/refs/jira/gaudi_971.err.ref
 delete mode 100644 GaudiExamples/tests/qmtest/refs/return_codes/input_file.err.ref

diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2rootex.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2rootex.qmt
index c0b5cbe151..796b6e3d8f 100644
--- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2rootex.qmt
+++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/aida2rootex.qmt
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?><!DOCTYPE extension  PUBLIC '-//QM/2.3/Extension//EN'  'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
 <!--
-    (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations
+    (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations
 
     This software is distributed under the terms of the Apache version 2 licence,
     copied verbatim in the file "LICENSE".
@@ -14,10 +14,9 @@
   <argument name="args"><set><text>-b</text></set></argument>
   <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
   <argument name="reference"><text>refs/Aida2RootEx.ref</text></argument>
-  <argument name="error_reference"><text>refs/Aida2RootEx.err.ref</text></argument>
   <argument name="validator"><text>
 preprocessor = (normalizeExamples +
-     LineSkipper(regexps = [r'Info in &lt;TCanvas::Print&gt;: png file .* has been created']))
+     LineSkipper(regexps = [r'INFO png file .* has been created']))
 
 validateWithReference(preproc = preprocessor)
  </text></argument>
diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/jira.qms/gaudi_971.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/jira.qms/gaudi_971.qmt
index a8be97adc1..20355af538 100644
--- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/jira.qms/gaudi_971.qmt
+++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/jira.qms/gaudi_971.qmt
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE extension  PUBLIC '-//QM/2.3/Extension//EN'  'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
 <!--
-    (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations
+    (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations
 
     This software is distributed under the terms of the Apache version 2 licence,
     copied verbatim in the file "LICENSE".
@@ -61,7 +61,6 @@ preprocessor = normalizeExamples + \
 validateWithReference(preproc = preprocessor)
 </text></argument>
 <argument name="reference"><text>refs/jira/gaudi_971.ref</text></argument>
-<argument name="error_reference"><text>refs/jira/gaudi_971.err.ref</text></argument>
 <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
 <argument name="prerequisites"><set>
   <tuple><text>gaudiexamples.root_io.write</text><enumeral>PASS</enumeral></tuple>
diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/return_codes.qms/input_file.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/return_codes.qms/input_file.qmt
index 5fa308f357..f10bac32a1 100644
--- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/return_codes.qms/input_file.qmt
+++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/return_codes.qms/input_file.qmt
@@ -1,6 +1,6 @@
 <?xml version="1.0" ?><!DOCTYPE extension  PUBLIC '-//QM/2.3/Extension//EN'  'http://www.codesourcery.com/qm/dtds/2.3/-//qm/2.3/extension//en.dtd'>
 <!--
-    (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations
+    (c) Copyright 1998-2023 CERN for the benefit of the LHCb and ATLAS collaborations
 
     This software is distributed under the terms of the Apache version 2 licence,
     copied verbatim in the file "LICENSE".
@@ -24,14 +24,11 @@ EventSelector(Input = ["DATAFILE='PFN:none.dst'  SVC='Gaudi::RootEvtSelector' OP
 app = ApplicationMgr(TopAlg = [sla(EventCount = 3, Mode = "failure")],
                      EvtMax = 5)
 </text></argument>
+<argument name="exit_code"><integer>2</integer></argument>
 <argument name="validator"><text>
-preprocessor = normalizeExamples + \
-    RegexpReplacer(when = "TFile::TFile",
-        orig = r"file (.*)none.dst does not exist",
-        repl = r"file .../none.dst does not exist")
-
-validateWithReference(preproc = preprocessor)
+expected = "/none.dst does not exist"
+if not expected in stdout:
+    causes.append("missing signature")
+    result["GaudiTest.expected_line"] = result.Quote(expected)
 </text></argument>
-<argument name="error_reference"><text>refs/return_codes/input_file.err.ref</text></argument>
-<argument name="exit_code"><integer>2</integer></argument>
 </extension>
diff --git a/GaudiExamples/tests/qmtest/refs/Aida2RootEx.err.ref b/GaudiExamples/tests/qmtest/refs/Aida2RootEx.err.ref
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/GaudiExamples/tests/qmtest/refs/Aida2RootEx.ref b/GaudiExamples/tests/qmtest/refs/Aida2RootEx.ref
index d3300f8ece..b685e9db82 100644
--- a/GaudiExamples/tests/qmtest/refs/Aida2RootEx.ref
+++ b/GaudiExamples/tests/qmtest/refs/Aida2RootEx.ref
@@ -256,6 +256,18 @@ Aida2RootEx2         INFO AIDA object: 'HistoEx2/ x vs y+3x (profile)'
 TH1.Print Name  =  x vs y+3x (profile), Entries= 5000, Total sum= -2.1759
 Aida2RootEx2         INFO AIDA object: 'HistoEx2/ x vs y-3x (profile)'
 TH1.Print Name  =  x vs y-3x (profile), Entries= 5000, Total sum= -2.24644
+TCanvas::Print       INFO png file HistoEx__1D_histo_.png has been created
+TCanvas::Print       INFO png file HistoEx__2D_histo_.png has been created
+TCanvas::Print       INFO png file HistoEx__3D_histo_.png has been created
+TCanvas::Print       INFO png file HistoEx1__1D_histo_.png has been created
+TCanvas::Print       INFO png file HistoEx1__2D_histo_.png has been created
+TCanvas::Print       INFO png file HistoEx1__3D_histo_.png has been created
+TCanvas::Print       INFO png file HistoEx2__x_vs_y____.png has been created
+TCanvas::Print       INFO png file HistoEx2__x_vs_y+3x_.png has been created
+TCanvas::Print       INFO png file HistoEx2__x_vs_y-3x_.png has been created
+TCanvas::Print       INFO png file HistoEx2__x_vs_y____(profile).png has been created
+TCanvas::Print       INFO png file HistoEx2__x_vs_y+3x_(profile).png has been created
+TCanvas::Print       INFO png file HistoEx2__x_vs_y-3x_(profile).png has been created
 The file name is 'HistoEx__1D_histo_.png'
 The file name is 'HistoEx__2D_histo_.png'
 The file name is 'HistoEx__3D_histo_.png'
diff --git a/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.err.ref b/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.err.ref
deleted file mode 100644
index a181338a53..0000000000
--- a/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.err.ref
+++ /dev/null
@@ -1 +0,0 @@
-Error in <TFile::TFile>: file dummy.dst does not exist
diff --git a/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref b/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref
index 92a502ba8f..8ccc7d21ce 100644
--- a/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref
+++ b/GaudiExamples/tests/qmtest/refs/jira/gaudi_971.ref
@@ -59,6 +59,7 @@ EventSelector.D...  DEBUG Selection root:/Event CLID:110
 EventSelector        INFO Stream:EventSelector.DataStreamTool_1 Def:DATAFILE='LFN:input.dst'  SVC='Gaudi::RootEvtSelector' OPT='READ'
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr       INFO Application Manager Started successfully
+TFile::TFile        ERROR file .../dummy.dst does not exist
 IODataManager       ERROR Error: connectDataIO> Cannot connect to database: PFN=dummy.dst FID=8BE41ECA-4004-11ED-8ECA-54AB3A714084
 IODataManager     WARNING Attempt to connect dsn:8BE41ECA-4004-11ED-8ECA-54AB3A714084 with next entry in data federation:ROOTIO.dst.
 FileRecordPersi...   INFO Added successfully Conversion service:RootCnvSvc
diff --git a/GaudiExamples/tests/qmtest/refs/return_codes/input_file.err.ref b/GaudiExamples/tests/qmtest/refs/return_codes/input_file.err.ref
deleted file mode 100644
index 5fdafce338..0000000000
--- a/GaudiExamples/tests/qmtest/refs/return_codes/input_file.err.ref
+++ /dev/null
@@ -1 +0,0 @@
-Error in <TFile::TFile>: file none.dst does not exist
-- 
GitLab