Commit 7a018ba7 authored by Kaj Williams's avatar Kaj Williams
Browse files

references #4657

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7708 41f8697f-d340-4b68-9986-7bafba869bb8
parent f23acf66
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -3,18 +3,24 @@ APPNAME = cnettable
include $(ISISROOT)/make/isismake.tsts

commands:
	cp $(INPUT)/appendTo.txt $(OUTPUT); \
	# This test is for the append function with data as of 2017-04-21
	find $(INPUT)/*.cub > $(OUTPUT)/cubeList.lst; \
	$(APPNAME) fromlist=$(OUTPUT)/cubeList.lst \
	cnet=$(INPUT)/testNet.net \
	flatfile=$(OUTPUT)/appendTo.txt \
	  append=true > /dev/null; 
	$(APPNAME) FROMLIST=$(OUTPUT)/cubeList.lst \
	CNET=$(INPUT)/testNet.net \
	FLATFILE=$(OUTPUT)/cnetstats.txt \
        > /dev/null;
	# Run again with append mode = true, using same files as above. This should duplicate the same
	# data in the output file.
	$(APPNAME) FROMLIST=$(OUTPUT)/cubeList.lst \
	CNET=$(INPUT)/testNet.net \
	FLATFILE=$(OUTPUT)/cnetstats.txt APPEND=TRUE \
        > /dev/null;      
	rm -f $(OUTPUT)/cubeList.lst > /dev/null;
	cat $(OUTPUT)/appendTo.txt | sed s/,\[^,]\*\.cub,/,file.cub,/ \
	  | sed 's/\([0-9][0-9]*\.[0-9]\)\([0-9][0-9]*\)/\1/g' \
	  | sed s/`date +%Y-%m-%dT`\[0-2\]\[0-9\]:\[0-5\]\[0-9\]:\[0-5\]\[0-9\]/date/ \
	cat $(OUTPUT)/cnetstats.txt | $(SED) s/,\[^,]\*\.cub,/,file.cub,/ \
	  | $(SED) 's/\([0-9][0-9]*\.[0-9]\)\([0-9][0-9]*\)/\1/g' \
	  | $(SED) s/`date +%Y-%m-%dT`\[0-2\]\[0-9\]:\[0-5\]\[0-9\]:\[0-5\]\[0-9\]/date/ \
	  > $(OUTPUT)/output.txt
	rm -f $(OUTPUT)/appendTo.txt
	rm -f $(OUTPUT)/cnetstats.txt > /dev/null;
	# To comment what is going on:
	# The 3 seds do as follows:
	# 1. remove cube filenames