changeset 160:35c1e2abeb9d

Making ThermostatQA buildable again.
author Zdenek Zambersky <zzambers@redhat.com>
date Thu, 11 Sep 2014 12:55:50 +0200
parents 5abf85c4d3ba
children 308d55883a24
files .hgignore Makefile patterns/1.1.0/AA/MainWindow/host_icon_with_arrow.png patterns/1.1.0/AA/MainWindow/vm_icon_blue2.png patterns/1.1.0/AA/MainWindow/vm_icon_whiteblue.png scripts/mongoPortNumber.txt scripts/run_thermostat_shell_with_commands.sh src/org/thermostat/qa/common/Configuration.java
diffstat 8 files changed, 33 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Thu Sep 11 12:55:50 2014 +0200
@@ -0,0 +1,22 @@
+syntax:glob
+
+bin/**	                # compiled classes
+logs/**                 # logs from tests
+reports/**              # reports from tests
+screenshots/**          # screenshots from tests
+manifest.mf             # generated by build phase
+.attach_pid*            # created by tests
+prototype.flotr-0.2.0-alpha.zip	# downloaded by makefile
+
+# auto-generated scripts and text files
+scripts/webStorage_*.sh
+scripts/thermostatPingHost.sh
+scripts/thermostatListVms.sh
+scripts/thermostatDumpHeap.sh
+scripts/xvfb*.sh
+scripts/guitests-cleanOneTest.sh
+scripts/run_thermostat_shell_with_commands.sh
+scripts/run_mongo_shell_with_commands.sh
+scripts/mongoPortNumber.txt
+scripts/dblogin.txt
+
--- a/Makefile	Mon Apr 28 16:13:20 2014 +0200
+++ b/Makefile	Thu Sep 11 12:55:50 2014 +0200
@@ -82,8 +82,6 @@
 	$(BUILD_DIR)/$(FRAMEWORK_PACKAGE)/ThermostatOutputTextsGenerator.class \
 	$(BUILD_DIR)/$(FRAMEWORK_PACKAGE)/GuiRobot.class \
 	$(BUILD_DIR)/$(FRAMEWORK_PACKAGE)/Patterns.class \
-	$(BUILD_DIR)/$(FRAMEWORK_PACKAGE)/IconCut.class \
-	$(BUILD_DIR)/$(FRAMEWORK_PACKAGE)/PatternDefinitionsGenerator.class \
 	$(BUILD_DIR)/$(TEST_PACKAGE)/AgentTest.class \
 	$(BUILD_DIR)/$(TEST_PACKAGE)/CliClientSmokeTest.class \
 	$(BUILD_DIR)/$(TEST_PACKAGE)/GuiClientSmokeTest.class \
Binary file patterns/1.1.0/AA/MainWindow/host_icon_with_arrow.png has changed
Binary file patterns/1.1.0/AA/MainWindow/vm_icon_blue2.png has changed
Binary file patterns/1.1.0/AA/MainWindow/vm_icon_whiteblue.png has changed
--- a/scripts/mongoPortNumber.txt	Mon Apr 28 16:13:20 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-27518
--- a/scripts/run_thermostat_shell_with_commands.sh	Mon Apr 28 16:13:20 2014 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-/home/jfabriko/thermostaty/testing_thermostat/thermostat/distribution/target/bin/thermostat shell < ./scripts/list-vms_therm_shell.txt
--- a/src/org/thermostat/qa/common/Configuration.java	Mon Apr 28 16:13:20 2014 +0200
+++ b/src/org/thermostat/qa/common/Configuration.java	Thu Sep 11 12:55:50 2014 +0200
@@ -32,6 +32,7 @@
 
 package org.thermostat.qa.common;
 
+import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -103,12 +104,12 @@
     {
         Properties properties = new Properties();
         properties.load(fileInputStream);
-        this.thermostatExecutablePath = properties.getProperty("thermostat_executable_path");
+        this.thermostatExecutablePath = getPathProperty(properties, "thermostat_executable_path");
         this.thermostatExecutableName = properties.getProperty("thermostat_executable_name");
         this.thermostatVersion = properties.getProperty("thermostat_version");
-        this.thermostatHome = properties.getProperty("thermostat_home");
-        this.thermostatUserHome = properties.getProperty("thermostat_user_home");
-        this.apacheTomcatHome = properties.getProperty("apache_tomcat_home");
+        this.thermostatHome = getPathProperty(properties, "thermostat_home");
+        this.thermostatUserHome = getPathProperty(properties, "thermostat_user_home");
+        this.apacheTomcatHome = getPathProperty(properties, "apache_tomcat_home");
         
         String str = properties.getProperty("screenshot_source");
         if( str.equals("dummy") ){
@@ -121,6 +122,12 @@
        
         this.performCleaningAfterGuiTests = properties.getProperty("clean_after_gui_test").equals("true");
     }
+    
+    /* eliminating need of tailing separator */
+    private static String getPathProperty(Properties properties, String name){
+        String value = properties.getProperty(name);
+        return value.endsWith(File.separator) ? value : value + File.separator;
+    }
 
     public ScreenshotSourceType getScreenshotsSource() {
         return screenshotsSource;