jtreg unit/regression tests: Shell scripts under CYGWIN
Joseph D. Darcy
Joe.Darcy at Sun.COM
Sat Aug 1 08:03:33 PDT 2009
Brad Wetmore wrote:
>
> I know I'm approaching "Holy War" territory, but developers are
> starting to use Cygwin instead of MKS for their windows build
> environments.
>
> Many of our existing test shell scripts contain the following pattern:
>
> OS=`uname -s`
> case "$OS" in
> SunOS | Linux )
> NULL=/dev/null
> PS=":"
> FS="/"
> TMP=/tmp
> ;;
> Windows_* )
> NULL=NUL
> PS=";"
> FS="\\"
> TMP="c:/temp"
> ;;
> * )
> echo "Unrecognized operating system!"
> exit 1;
> ;;
> esac
>
> This will fail on CYGWIN, as `uname -s` returns "CYGWIN_NT-5.1". The
> fix is to update the Windows_* line to include CYGWIN:
>
> Windows_* | CYGWIN* )
>
> Please do this when writing new tests or updating existing ones.
And it would be a fine little project if someone wanted to add the
Cygwin support proactively to all the shell regression tests!
-Joe
More information about the jdk7-dev
mailing list