From 2e574a45ffdabc7972348c514d4c8f3c7c4050c8 Mon Sep 17 00:00:00 2001
From: Gary Williams <gary.williams@forgerock.com>
Date: Sat, 22 Sep 2012 13:26:52 +0000
Subject: [PATCH] If functional tests logs hosted on web server just use directly the url

---
 opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
index 22003901..74c0cc0 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
@@ -661,11 +661,19 @@
           write_text_elements(service,testwareElementList)
         
         testwareElementList=[]
-        
+
+        #If test logs hosted on web server just use directly the url
+        if logsURI.startswith('http://'):
+          root_uri = ''
+          base_uri = '%s/%s' % (logsURI,os.path.split(logsDir)[1])
+        else:
+          root_uri = logsURI
+          base_uri = logsDir
+   
         # Create the id elements
         idElementList=[]
-        idElementList.append(['tests-dir',logsDir])
-        idElementList.append(['tests-url',logsURI])
+        idElementList.append(['tests-dir',base_uri])
+        idElementList.append(['tests-url',root_uri])
         idElementList.append(['mailto',SEND_MAIL_TO])
         idElementList.append(['coverage-url',coverageUrl])
 

--
Gitblit v1.10.0