jtreg unit/regression tests: Shell scripts under CYGWIN
Max (Weijun) Wang
Weijun.Wang at Sun.COM
Sun Aug 2 01:28:14 PDT 2009
Is it possible to pull out these common codes into a separate file and
include it in each script?
Thanks
Max
On Aug 2, 2009, at 12:03 AM, Jonathan Gibbons wrote:
>
> On Aug 1, 2009, at 8:03 AM, Joseph D. Darcy wrote:
>
>> 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!
>
> I should mention the alternative possibility that it may be possible
> to convert some shell tests to Java programs. This technique is
> routinely used in the langtools repository, where we have managed to
> eliminate a many/most of the shell tests.
>
>
>>
>>
>> -Joe
>
More information about the jdk7-dev
mailing list