changeset 174:4d8930e19c50

Added makefile target for generating help message text files (used by tests)
author Zdenek Zambersky <zzambers@redhat.com>
date Thu, 19 Mar 2015 12:54:36 +0100
parents 6b6ac47a811f
children 34de0ddba44a
files Makefile
diffstat 1 files changed, 32 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Mar 19 12:44:59 2015 +0100
+++ b/Makefile	Thu Mar 19 12:54:36 2015 +0100
@@ -209,10 +209,38 @@
 #create a directory outputtexts/versionN for the current version
 #of the output_texts (can be found in the test.properties)
 #generate output help messages into files
-generatetexts:	$(ALL_CLASSES)
-	mkdir -p outputtexts
-	mkdir -p outputtexts/`cat test.properties | grep thermostat_version | sed -e 's/^.*=//g;s/$$//g'`
-	$(JAVA) -cp $(CLASSES_DIR) org.thermostat.qa.framework.ThermostatOutputTextsGenerator
+
+generate-messages: thermostat-build | $(THERMOSTAT_USER_DIR)/data/setup-complete.stamp
+	mkdir -p outputtexts/$(THERMOSTAT_VERSION)
+	thermostat=$(THERMOSTAT_DIR)/distribution/target/image/bin/thermostat ; \
+	helpParams=( \
+	    "agent" \
+	    "connect" \
+	    "disconnect" \
+	    "dump-heap" \
+	    "find-objects" \
+	    "find-root" \
+	    "gui" \
+	    "list-heap-dumps" \
+	    "list-vms" \
+	    "object-info" \
+	    "ping" \
+	    "save-heap-dump-to-file" \
+	    "show-heap-histogram" \
+	    "service" \
+	    "shell" \
+	    "storage" \
+	    "vm-info" \
+	    "vm-stat" \
+	) ; \
+	export USER_THERMOSTAT_HOME=$(THERMOSTAT_USER_DIR) ; \
+	echo "exit" | $$thermostat shell > outputtexts/$(THERMOSTAT_VERSION)/output_of_exit_therm_shell.txt ; \
+	echo -e "help\nexit" | $$thermostat shell > outputtexts/$(THERMOSTAT_VERSION)/output_of_help_therm_shell.txt ; \
+	$$thermostat > outputtexts/$(THERMOSTAT_VERSION)/thermostat.txt ; \
+	$$thermostat help > outputtexts/$(THERMOSTAT_VERSION)/thermostat_help.txt ; \
+	for param in $${helpParams[@]} ; do \
+	    $$thermostat help $$param > outputtexts/$(THERMOSTAT_VERSION)/thermostat_help_$${param}.txt ; \
+	done
 
 #make icons in given dir smaller / remove unnecessary pixels
 cuticons:  $(ALL_CLASSES)