Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2009 18:09:49 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187334 - head/tools/regression/fstest/tests
Message-ID:  <200901161809.n0GI9nkh014801@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Fri Jan 16 18:09:49 2009
New Revision: 187334
URL: http://svn.freebsd.org/changeset/base/187334

Log:
  Be more Solaris-friendly.
  
  Submitted by:	Milan Cermak <Milan.Cermak@Sun.COM>

Modified:
  head/tools/regression/fstest/tests/conf
  head/tools/regression/fstest/tests/misc.sh

Modified: head/tools/regression/fstest/tests/conf
==============================================================================
--- head/tools/regression/fstest/tests/conf	Fri Jan 16 18:00:25 2009	(r187333)
+++ head/tools/regression/fstest/tests/conf	Fri Jan 16 18:09:49 2009	(r187334)
@@ -6,15 +6,19 @@ os=`uname`
 
 case "${os}" in
 FreeBSD|Darwin)
+	GREP=grep
 	#fs=`df -T . | tail -1 | awk '{print $2}'`
 	pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
 	fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}'`
 	;;
-Solaris)
-	pattern="`df -k . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
-	fs=`mount -v | egrep "^${pattern}" | awk '{print $5}'`
+Solaris|SunOS)
+	GREP=ggrep
+	pattern=`df -k . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`
+	fs=`mount -v | egrep "^${pattern}" | awk '{print $5}' | \
+	    tr -s '[:lower:]' '[:upper:]'`
 	;;
 Linux)
+	GREP=grep
 	fs=`df -PT . | tail -1 | awk '{print $2}'`
 	;;
 *)

Modified: head/tools/regression/fstest/tests/misc.sh
==============================================================================
--- head/tools/regression/fstest/tests/misc.sh	Fri Jan 16 18:00:25 2009	(r187333)
+++ head/tools/regression/fstest/tests/misc.sh	Fri Jan 16 18:09:49 2009	(r187334)
@@ -87,7 +87,7 @@ test_check()
 
 todo()
 {
-	echo "${os}" | grep -iq "${1}"
+	echo "${os}" | $GREP -iq "${1}"
 	if [ $? -eq 0 ]; then
 		todomsg="${2}"
 	fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901161809.n0GI9nkh014801>