From 87fadb5ec86d2c7927099090a528d16a444afd4c Mon Sep 17 00:00:00 2001
From: andrug <andrug@localhost>
Date: Tue, 01 Jul 2008 15:29:14 +0000
Subject: [PATCH] QA: System Test: allow monitoring client to use dedicated config.xml file
---
opends/tests/system-tests/clients/monitoring/monitoringLib.xml | 12 +++++++++---
opends/tests/system-tests/clients/monitoring/monitoringPreamble.xml | 17 +++++++++++++++++
2 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/opends/tests/system-tests/clients/monitoring/monitoringLib.xml b/opends/tests/system-tests/clients/monitoring/monitoringLib.xml
index c9acb58..6e21b2e 100755
--- a/opends/tests/system-tests/clients/monitoring/monitoringLib.xml
+++ b/opends/tests/system-tests/clients/monitoring/monitoringLib.xml
@@ -66,10 +66,15 @@
if serverInstanceFromClient == NOT_DEFINED:
msg = '%s\nERROR: serverInstanceFromClient undefined,mandatory' % msg
-
+ needCopy = 0
configFile = getPropValue('configFile')
if configFile == NOT_DEFINED or configFile == '':
- configFile = '%s/MonitoringClient/config.xml' % client.getPath()
+ configFilePath = '%s/MonitoringClient/config.xml' % client.getPath()
+ elif configFile.find('/') == -1:
+ needCopy = 1
+ configFilePath = '%s/scenario/%s/%s' % \
+ (LOCAL_TESTS_DIR,DIR_NAME,configFile)
+
interval = getPropValue('interval')
unit = getPropValue('unit')
@@ -95,7 +100,7 @@
parms.append('-m "%s""' % serverInstance.getJVMPort())
parms.append('-D "%s" -w "%s"' % \
(DIRECTORY_INSTANCE_DN,DIRECTORY_INSTANCE_PSWD))
- parms.append('-f %s -r %s' % (configFile,client.getLogDir()))
+ parms.append('-f %s -r %s' % (configFilePath,client.getLogDir()))
if interval != NOT_DEFINED:
parms.append(' -i %s' % interval)
if unit != NOT_DEFINED:
@@ -126,6 +131,7 @@
</script>
+
</sequence>
</function>
diff --git a/opends/tests/system-tests/clients/monitoring/monitoringPreamble.xml b/opends/tests/system-tests/clients/monitoring/monitoringPreamble.xml
index 9069fbe..934e927 100755
--- a/opends/tests/system-tests/clients/monitoring/monitoringPreamble.xml
+++ b/opends/tests/system-tests/clients/monitoring/monitoringPreamble.xml
@@ -84,6 +84,23 @@
</sequence>
<else>
<sequence>
+ <if expr="needCopy == 1">
+ <sequence>
+ <call function="'copyFile'">
+ {
+ 'srcFile' : '%s/scenario/%s/%s' % \
+ (TESTS_DIR,scenario.getName(),configFile),
+ 'destFile' : configFilePath,
+ 'location' : STAXServiceMachine,
+ 'remoteHost' : client.getHost(),
+ 'fileFd' : fileFd
+ }
+ </call>
+ <script>errNum += STAXResult[0]</script>
+ </sequence>
+ </if>
+
+
<!-- ========================================================== -->
<!-- =============== Build Monitoring Client ================== -->
<!-- ========== Run the client ========== -->
--
Gitblit v1.10.0