Commit e7a7a47e authored by Kim Oyama's avatar Kim Oyama
Browse files

PROG Added an app test for spiceserver and fixed a hard coded file path that I...

PROG Added an app test for spiceserver and fixed a hard coded file path that I left in spiceserver.cpp. References #2030.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5822 41f8697f-d340-4b68-9986-7bafba869bb8
parent aef634ae
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -285,8 +285,7 @@ void IsisMain() {
       *
       * This program has read and write access on the spice server in /tmp/spice_web_service.
       */
      inputLabels = FileName::createTempFile("/tmp/spice_web_service/inputLabels.cub");// ui.GetFileName("TEMPFILE") );
      //"/tmp/spice_web_service/inputLabels.cub");
      inputLabels = FileName::createTempFile( ui.GetFileName("TEMPFILE") );
      label.write( inputLabels.expanded() );
      Cube cube;
      cube.open(inputLabels.expanded(), "r");
+26 −0
Original line number Diff line number Diff line
APPNAME = spiceserver

include $(ISISROOT)/make/isismake.tsts

# In order to understand the input/output files, run this:
#   cat input/request.txt | xxd -r -ps
#
# or for the output:
#   cat output/result.txt | xxd -r -ps
#
# To understand the doubly-encoded parts, just copy the hex
#   and run this:
#   echo "...long hex string..." | xxd -r -ps
#
# Valid text comes out magically. I promise! :)

commands:
	$(APPNAME) from=$(INPUT)/requestHex.txt checkversion=false to=$(OUTPUT)/resultHex.txt \
	  tempfile=$(OUTPUT)/tempCube.cub > /dev/null; \
	cat $(OUTPUT)/resultHex.txt | xxd -r -ps >> $(OUTPUT)/decoded1.txt;\
	awk '/\<kernels_label\>/{getline; print}' $(OUTPUT)/decoded1.txt | xxd -r -ps >> $(OUTPUT)/kernelsGroup.pvl; \
	awk '/\<instrument_position\>/{getline; print}' $(OUTPUT)/decoded1.txt | xxd -r -ps >> $(OUTPUT)/tmp.txt; \
	awk '{print} /End_Object/ {exit}' $(OUTPUT)/tmp.txt >> $(OUTPUT)/instrumentPosition.pvl;\
	$(RM) $(OUTPUT)/decoded1.txt;
	$(RM) $(OUTPUT)/resultHex.txt;
	$(RM) $(OUTPUT)/tmp.txt;