# HG changeset patch # User Zdenek Zambersky # Date 1410432950 -7200 # Node ID 35c1e2abeb9d2abfebc92496b4b49273c69f807d # Parent 5abf85c4d3bac41b71e6c5647614b331e98af454 Making ThermostatQA buildable again. diff -r 5abf85c4d3ba -r 35c1e2abeb9d .hgignore --- /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 + diff -r 5abf85c4d3ba -r 35c1e2abeb9d Makefile --- 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 \ diff -r 5abf85c4d3ba -r 35c1e2abeb9d patterns/1.1.0/AA/MainWindow/host_icon_with_arrow.png Binary file patterns/1.1.0/AA/MainWindow/host_icon_with_arrow.png has changed diff -r 5abf85c4d3ba -r 35c1e2abeb9d patterns/1.1.0/AA/MainWindow/vm_icon_blue2.png Binary file patterns/1.1.0/AA/MainWindow/vm_icon_blue2.png has changed diff -r 5abf85c4d3ba -r 35c1e2abeb9d patterns/1.1.0/AA/MainWindow/vm_icon_whiteblue.png Binary file patterns/1.1.0/AA/MainWindow/vm_icon_whiteblue.png has changed diff -r 5abf85c4d3ba -r 35c1e2abeb9d scripts/mongoPortNumber.txt --- 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 diff -r 5abf85c4d3ba -r 35c1e2abeb9d scripts/run_thermostat_shell_with_commands.sh --- 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 diff -r 5abf85c4d3ba -r 35c1e2abeb9d src/org/thermostat/qa/common/Configuration.java --- 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;