From 442702f14ee67aed3eb038e991c51472a326539f Mon Sep 17 00:00:00 2001
From: Mika Anton Vesterinen <mvesteri@lxplus014.cern.ch>
Date: Sun, 15 May 2016 11:06:28 +0200
Subject: [PATCH 1/2] added new TCK tests

---
 .../tests/options/TCK/CreateTCK1AndEntry.py   | 14 +++++++++
 .../tests/options/TCK/CreateTCK2AndEntry.py   | 14 +++++++++
 .../physics.qms/tck.qms/createtck1.qmt        |  8 ++---
 .../physics.qms/tck.qms/createtck2.qmt        | 30 ++++++++++++++++++
 .../physics.qms/tck.qms/testtck1.qmt          | 31 +++++++++++++++++++
 .../physics.qms/tck.qms/testtck2.qmt          | 31 +++++++++++++++++++
 6 files changed, 123 insertions(+), 5 deletions(-)
 create mode 100644 Hlt/Moore/tests/options/TCK/CreateTCK1AndEntry.py
 create mode 100644 Hlt/Moore/tests/options/TCK/CreateTCK2AndEntry.py
 create mode 100755 Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck2.qmt
 create mode 100755 Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck1.qmt
 create mode 100755 Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck2.qmt

diff --git a/Hlt/Moore/tests/options/TCK/CreateTCK1AndEntry.py b/Hlt/Moore/tests/options/TCK/CreateTCK1AndEntry.py
new file mode 100644
index 00000000000..e909a45cef1
--- /dev/null
+++ b/Hlt/Moore/tests/options/TCK/CreateTCK1AndEntry.py
@@ -0,0 +1,14 @@
+import subprocess
+mycmd = ["gaudirun.py","$MOOREROOT/tests/options/TCK/CreateTCK1.py","$MOOREROOT/tests/options/TCK/TCKOptions.py"]
+p = subprocess.Popen(mycmd, stdout=subprocess.PIPE)
+iLine = 0
+for logline in p.stdout.readlines():
+    iLine += 1
+    print iLine,"\t",logline
+    if 'top id for this config' in logline:
+        TCKID = logline.split()[7]
+import os
+TCKNUM="0x10011600"
+print 'Make TCK entry with:',TCKID,TCKNUM
+os.system("python $MOOREROOT/tests/options/TCK/CreateTCKEntry.py %s %s" %(TCKID,TCKNUM))
+
diff --git a/Hlt/Moore/tests/options/TCK/CreateTCK2AndEntry.py b/Hlt/Moore/tests/options/TCK/CreateTCK2AndEntry.py
new file mode 100644
index 00000000000..f9227e7bc3d
--- /dev/null
+++ b/Hlt/Moore/tests/options/TCK/CreateTCK2AndEntry.py
@@ -0,0 +1,14 @@
+import subprocess
+mycmd = ["gaudirun.py","$MOOREROOT/tests/options/TCK/CreateTCK2.py","$MOOREROOT/tests/options/TCK/TCKOptions.py"]
+p = subprocess.Popen(mycmd, stdout=subprocess.PIPE)
+iLine = 0
+for logline in p.stdout.readlines():
+    iLine += 1
+    print iLine,"\t",logline
+    if 'top id for this config' in logline:
+        TCKID = logline.split()[7]
+import os
+TCKNUM="0x20011600"
+print 'Make TCK entry with:',TCKID,TCKNUM
+os.system("python $MOOREROOT/tests/options/TCK/CreateTCKEntry.py %s %s" %(TCKID,TCKNUM))
+
diff --git a/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck1.qmt b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck1.qmt
index 393d7c5ed60..b0e7e7ece8f 100755
--- a/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck1.qmt
+++ b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck1.qmt
@@ -4,19 +4,17 @@
 # SUMMARY OF THIS TEST
 # ...................
 # Author: mvesteri
-# Purpose: Create a Hlt1 TCK
+# Purpose: Create a Hlt1 TCK config and map to a TCK in local file TCKData/config.cdb
 # Prerequisites: None
 # Common failure modes, severities and cures: 
 #               . MAJOR: 
 #######################################################
 -->
 <extension class="GaudiTest.GaudiExeTest" kind="test">
-  <argument name="program"><text>gaudirun.py</text></argument>
+  <argument name="program"><text>python</text></argument>
   <argument name="args"><set>
-    <text>$MOOREROOT/tests/options/TCK/CreateTCK1.py</text>
-    <text>$MOOREROOT/tests/options/TCK/TCKOptions.py</text>
+    <text>$MOOREROOT/tests/options/TCK/CreateTCK1AndEntry.py</text>
   </set></argument>
-
   <argument name="timeout">
     <integer>1200</integer>
   </argument>
diff --git a/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck2.qmt b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck2.qmt
new file mode 100755
index 00000000000..e3ff5c56026
--- /dev/null
+++ b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/createtck2.qmt
@@ -0,0 +1,30 @@
+<?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'>
+<!--
+#######################################################
+# SUMMARY OF THIS TEST
+# ...................
+# Author: mvesteri
+# Purpose: Create a Hlt2 TCK config and map to a TCK in local file TCKData/config.cdb
+# Prerequisites: None
+# Common failure modes, severities and cures: 
+#               . MAJOR: 
+#######################################################
+-->
+<extension class="GaudiTest.GaudiExeTest" kind="test">
+  <argument name="program"><text>python</text></argument>
+  <argument name="args"><set>
+    <text>$MOOREROOT/tests/options/TCK/CreateTCK2AndEntry.py</text>
+  </set></argument>
+  <argument name="timeout">
+    <integer>1200</integer>
+  </argument>
+  <argument name="prerequisites"><set>
+    <tuple><text>moore.physics.tck.testtck1</text><enumeral>PASS</enumeral></tuple>
+  </set></argument>
+  <argument name="validator"><text>
+
+countErrorLines({"FATAL":0,"ERROR":0})
+
+</text></argument>
+</extension>
+
diff --git a/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck1.qmt b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck1.qmt
new file mode 100755
index 00000000000..ce73f4fa43a
--- /dev/null
+++ b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck1.qmt
@@ -0,0 +1,31 @@
+<?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'>
+<!--
+#######################################################
+# SUMMARY OF THIS TEST
+# ...................
+# Author: mvesteri
+# Purpose: Run from the Hlt1 TCK that has just been created in TCKData/config.cdb by createtck1.qmt
+# Prerequisites: None
+# Common failure modes, severities and cures: 
+#               . MAJOR: 
+#######################################################
+-->
+<extension class="GaudiTest.GaudiExeTest" kind="test">
+  <argument name="program"><text>gaudirun.py</text></argument>
+  <argument name="args"><set>
+     <text>$MOOREROOT/tests/options/TCK/TestTCK1.py</text>
+     <text>$MOOREROOT/tests/options/TCK/TCKOptions.py</text>
+  </set></argument>
+  <argument name="timeout">
+    <integer>1200</integer>
+  </argument>
+  <argument name="prerequisites"><set>
+     <tuple><text>moore.physics.tck.createtck1</text><enumeral>PASS</enumeral></tuple>
+  </set></argument>
+  <argument name="validator"><text>
+
+countErrorLines({"FATAL":0,"ERROR":0})
+
+</text></argument>
+</extension>
+
diff --git a/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck2.qmt b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck2.qmt
new file mode 100755
index 00000000000..3f73cb80ebc
--- /dev/null
+++ b/Hlt/Moore/tests/qmtest/moore.qms/physics.qms/tck.qms/testtck2.qmt
@@ -0,0 +1,31 @@
+<?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'>
+<!--
+#######################################################
+# SUMMARY OF THIS TEST
+# ...................
+# Author: mvesteri
+# Purpose: Run from the Hlt2 TCK that has just been created in TCKData/config.cdb by createtck2.qmt
+# Prerequisites: None
+# Common failure modes, severities and cures: 
+#               . MAJOR: 
+#######################################################
+-->
+<extension class="GaudiTest.GaudiExeTest" kind="test">
+  <argument name="program"><text>gaudirun.py</text></argument>
+  <argument name="args"><set>
+     <text>$MOOREROOT/tests/options/TCK/TestTCK2.py</text>
+     <text>$MOOREROOT/tests/options/TCK/TCKOptions.py</text>
+  </set></argument>
+  <argument name="timeout">
+    <integer>1200</integer>
+  </argument>
+  <argument name="prerequisites"><set>
+     <tuple><text>moore.physics.tck.createtck2</text><enumeral>PASS</enumeral></tuple>
+  </set></argument>
+  <argument name="validator"><text>
+
+countErrorLines({"FATAL":0,"ERROR":0})
+
+</text></argument>
+</extension>
+
-- 
GitLab


From 2120742f2e958bab9c9190710afb84b2d5c79af3 Mon Sep 17 00:00:00 2001
From: Mika Anton Vesterinen <mvesteri@lxplus014.cern.ch>
Date: Sun, 15 May 2016 20:42:01 +0200
Subject: [PATCH 2/2] Add further qmttests for creation and testing of Hlt1 and
 Hlt2 TCKs

---
 Hlt/Moore/doc/release.notes | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Hlt/Moore/doc/release.notes b/Hlt/Moore/doc/release.notes
index 71c9942feb1..794f714c295 100755
--- a/Hlt/Moore/doc/release.notes
+++ b/Hlt/Moore/doc/release.notes
@@ -4,6 +4,9 @@
 ! Purpose     : LHCb HLT application
 !============================================
 
+! 2016-05-15 - Mika Vesterinen
+ - Add further qmttests for creation and testing of Hlt1 and Hlt2 TCKs
+
 ! 2016-04-27 - Mika Vesterinen
  - Add qmttests for the RedoL0 and CreateTCK1 steps of the split TCK creation and testing procedure
 
-- 
GitLab