# HG changeset patch # User Zdenek Zambersky # Date 1426766076 -3600 # Node ID 4d8930e19c500e3b17f6503aca696ce7b597951a # Parent 6b6ac47a811fd597e189ebf18965ea83f6b880dc Added makefile target for generating help message text files (used by tests) diff -r 6b6ac47a811f -r 4d8930e19c50 Makefile --- 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)