Remove NNG libraries from packages

The default build process will no longer include the NNG
libraries (librmr_nng.*) by default.  It is still possible
to enable them with a CMake build flag (-DBUILD_NNG=1).

The NNG specific unit tests have been disabled.

Some SI95 specific unit tests have been enhanced in an effort
to work toward full coverage of the SI95 code.

This change is in a major version bump as the package contents
change. However, there is NOT an API change; all existing
applications will be able to use the new version without any
modification (other than possibly removing references to the
NNG based libraries).

Issue-ID: RIC-337

Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: Ic9854b1ffc1e82c765692a11724d8086d24cceed
diff --git a/test/unit_test.ksh b/test/unit_test.ksh
index ad21465..718055a 100755
--- a/test/unit_test.ksh
+++ b/test/unit_test.ksh
@@ -190,7 +190,7 @@
 		}
 	}
 
-	/-:/ { 				# skip unexecutable lines
+	/-:/ {				# skip unexecutable lines
 		spit_line()
 		seq++					# allow blank lines in a sequence group
 		next
@@ -345,7 +345,8 @@
 quiet=0
 gen_xml=0
 replace_flags=1									# replace ##### in gcov for discounted lines
-run_nano_tests=0
+run_nano_tests=0								# can nolonger be turned on
+run_nng_tests=0									# -N will enable
 always_gcov=0									# -a sets to always run gcov even if failure
 save_gcov=1										# -o turns this off
 out_dir=${UT_COVERAGE_DIR:-/tmp/rmr_gcov}		# -O changes output directory
@@ -360,7 +361,7 @@
 		-C)	builder="$2"; shift;;		# custom build command
 		-G)	builder="gmake %s";;
 		-M)	builder="mk -a %s";;		# use plan-9 mk (better, but sadly not widly used)
-		-N)	run_nano_tests=1;;
+		-N)	run_nng_tests=1;;
 		-O)	out_dir=$2; shift;;
 
 		-a)	always_gcov=1;;
@@ -385,9 +386,9 @@
 			;;
 
 
-		-h) 	usage; exit 0;;
+		-h)		usage; exit 0;;
 		--help) usage; exit 0;;
-		-\?) 	usage; exit 0;;
+		-\?)	usage; exit 0;;
 
 		*)	echo "unrecognised option: $1" >&2
 			usage >&2
@@ -399,7 +400,7 @@
 done
 
 
-if (( strict )) 		# if in strict mode, coverage shortcomings are failures
+if (( strict ))			# if in strict mode, coverage shortcomings are failures
 then
 	cfail="FAIL"
 else
@@ -418,11 +419,16 @@
 	do
 		if [[ $tfile != *"static_test.c" ]]
 		then
-			if(( ! run_nano_tests )) && [[ $tfile == *"nano"* ]]
+			if (( ! run_nng_tests )) && [[ $tfile == *"nng"* ]]		# drop any nng file unless -N given
+			then
+				continue
+			fi
+			if [[ $tfile == *"nano"* ]]			# no longer support nano tests; drop regardless
 			then
 				continue
 			fi
 
+			echo "<INFO> add test: $tfile" >&2
 			flist="${flist}$tfile "
 		fi
 	done
@@ -445,6 +451,11 @@
 ut_errors=0			# unit test errors (not coverage errors)
 errors=0
 
+if ! touch /tmp/PPID$$.noise
+then
+	echo "<ERR> unable to write to /tmp???"
+fi
+
 for tfile in $flist
 do
 	for x in *.gcov
@@ -455,14 +466,14 @@
 		fi
 	done
 
+	echo "$tfile --------------------------------------"
 	(	# all noise is now captured into a tmp file to support quiet mode
-		echo "$tfile --------------------------------------"
 		bcmd=$( printf "$builder" "${tfile%.c}" )
 		if ! $bcmd >/tmp/PID$$.log 2>&1
 		then
 			echo "[FAIL] cannot build $tfile"
 			cat /tmp/PID$$.log
-			rm -f /tmp/PID$$
+			# do NOT remove tmp files; bash seens to not gen a new PID for subshells
 			exit 1
 		fi
 
@@ -612,7 +623,6 @@
 						}
 					}
 				}
-
 			}
 
 			END {
@@ -623,7 +633,7 @@
 		rc=$?
 		cat /tmp/PID$$.log
 
-		if (( rc  || force_discounting )) 	# didn't pass, or forcing, see if discounting helps
+		if (( rc  || force_discounting ))	# didn't pass, or forcing, see if discounting helps
 		then
 			if (( ! verbose ))
 			then
@@ -645,7 +655,7 @@
 
 				tail -1 /tmp/PID$$.disc | grep '\['
 
-				if (( verbose > 1 )) 			# updated file was generated, keep here
+				if (( verbose > 1 ))			# updated file was generated, keep here
 				then
 					echo "[INFO] discounted coverage info in: ${tfile##*/}.dcov"
 				fi
@@ -653,7 +663,7 @@
 				mv /tmp/PID$$.disc ${name##*/}.dcov
 			done
 		fi
- 	)>/tmp/PID$$.noise 2>&1
+	)>/tmp/PID$$.noise 2>&1
 	if (( $? != 0 ))
 	then
 		(( ut_errors++ ))
@@ -685,7 +695,7 @@
 	if [[ $xx != *"test"* ]]
 	then
 		of=${xx%.gcov}.dcov
-	 	discount_an_checks $xx  >$of
+		discount_an_checks $xx  >$of
 		if [[ -n $of ]]
 		then
 			tail -1 $of |  grep '\['