Re: [NEW BUG] Running jtreg tests on NetBSD

2008-07-07 Thread Jonathan Gibbons

Alex,

It is a long term goal to replace as many shell tests as possible in the 
langtools
repository, typically with Java equivalents.  For the short term, 
Martin's suggestion

is a good one. I'd be happy to work with you on short or medium term changes
if you want to help.

-- Jon



Martin Buchholz wrote:

Of course, the non-portable constructs in the shell scripts come from
a long term mindset of if it's not solaris or linux, it must be windows.

Better would be if it's not windows, it must be unix

Very compactly (untested):

case `uname -s` in
 Windows* | CYGWIN*) NULL=NUL PS=; FS=\\ ;;
 *) NULL=/dev/null PS=: FS=/ ;;
esac

This would be a pervasive change.

Martin


On Tue, Jun 24, 2008 at 6:51 PM, Alex Potanin
[EMAIL PROTECTED] wrote:
  

Hello,

I am working on the javac extension and I tried to run the javac tests in
the OpenJDK's latest Mercurial repository.
em daqsh w3.org
I see that a few of them contain the following in the shell scripts:

# set platform-dependent variables
OS=`uname -s`
case $OS in
 SunOS | Linux )
   NULL=/dev/null
   PS=:
   FS=/
   ;;
 Windows* )
   NULL=NUL
   PS=;
   FS=\\
   ;;
 * )
   echo Unrecognized system!
   exit 1;
   ;;
esac

Since I use NetBSD, my 'uname -s' returns NetBSD.

I had to add | NetBSD to the SunOS | Linux line to fix the test scripts
so that they don't return Unrecognized system!.

Some of the affected scripts are:

tools/javac/4846262/Test.sh
tools/javac/6302184/T6302184.sh
tools/javac/ClassPathTest/ClassPathTest.sh

But there are others that I can find if required (I suspect grepping will do
a good job).

I was wondering if it can please be fixed to take NetBSD into account or
whether there is a better way of fixing this?

Thanks,
Alex.






Re: [NEW BUG] Running jtreg tests on NetBSD

2008-06-28 Thread Martin Buchholz
Of course, the non-portable constructs in the shell scripts come from
a long term mindset of if it's not solaris or linux, it must be windows.

Better would be if it's not windows, it must be unix

Very compactly (untested):

case `uname -s` in
 Windows* | CYGWIN*) NULL=NUL PS=; FS=\\ ;;
 *) NULL=/dev/null PS=: FS=/ ;;
esac

This would be a pervasive change.

Martin


On Tue, Jun 24, 2008 at 6:51 PM, Alex Potanin
[EMAIL PROTECTED] wrote:
 Hello,

 I am working on the javac extension and I tried to run the javac tests in
 the OpenJDK's latest Mercurial repository.

 I see that a few of them contain the following in the shell scripts:

 # set platform-dependent variables
 OS=`uname -s`
 case $OS in
  SunOS | Linux )
NULL=/dev/null
PS=:
FS=/
;;
  Windows* )
NULL=NUL
PS=;
FS=\\
;;
  * )
echo Unrecognized system!
exit 1;
;;
 esac

 Since I use NetBSD, my 'uname -s' returns NetBSD.

 I had to add | NetBSD to the SunOS | Linux line to fix the test scripts
 so that they don't return Unrecognized system!.

 Some of the affected scripts are:

 tools/javac/4846262/Test.sh
 tools/javac/6302184/T6302184.sh
 tools/javac/ClassPathTest/ClassPathTest.sh

 But there are others that I can find if required (I suspect grepping will do
 a good job).

 I was wondering if it can please be fixed to take NetBSD into account or
 whether there is a better way of fixing this?

 Thanks,
 Alex.



[NEW BUG] Running jtreg tests on NetBSD

2008-06-25 Thread Alex Potanin

Hello,

I am working on the javac extension and I tried to run the javac tests 
in the OpenJDK's latest Mercurial repository.


I see that a few of them contain the following in the shell scripts:

# set platform-dependent variables
OS=`uname -s`
case $OS in
  SunOS | Linux )
NULL=/dev/null
PS=:
FS=/
;;
  Windows* )
NULL=NUL
PS=;
FS=\\
;;
  * )
echo Unrecognized system!
exit 1;
;;
esac

Since I use NetBSD, my 'uname -s' returns NetBSD.

I had to add | NetBSD to the SunOS | Linux line to fix the test 
scripts so that they don't return Unrecognized system!.


Some of the affected scripts are:

tools/javac/4846262/Test.sh
tools/javac/6302184/T6302184.sh
tools/javac/ClassPathTest/ClassPathTest.sh

But there are others that I can find if required (I suspect grepping 
will do a good job).


I was wondering if it can please be fixed to take NetBSD into account or 
whether there is a better way of fixing this?


Thanks,
Alex.
begin:vcard
fn:Alex Potanin
n:Potanin;Alex
org:Victoria University of Wellington;School of Mathematics, Statistics, and Computer Science
adr:;;PO Box 600;Wellington;;;New Zealand
email;internet:[EMAIL PROTECTED]
title:Lecturer
tel;work:+64 (4) 463 5302
tel;cell:+64 (21) 201 6740
x-mozilla-html:FALSE
url:http://www.mcs.vuw.ac.nz/~alex/
version:2.1
end:vcard