You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Nathan Beyer <nd...@apache.org> on 2007/04/08 06:04:19 UTC
[drlvm] Is Cygwin required for kernel.test?
Does the java.lang.RuntimeTest2 kernel.test in DRLVM require Cygwin to
work in a Windows OS? I'm recieving the following failure from the
test_exec_Str_F2T1S2Z test method.
check002: sh.exe seems to have not been found by default! Please, set
the path to sh.exe via java.library.path property.
I looked at the code and I don't see how this bit of code could ever
succeed in a Windows environment without Cygwin.
File f = new java.io.File("C:\\CygWin\\bin");
Process p;
if (f.exists()) {
p = Runtime.getRuntime().exec(new String[] {
cmnd, "/C", "sh", "-c",
"echo $#; echo $0; echo $1; echo $2; echo $3; " +
"echo $4; echo $5; echo $6; echo $7",
"Hello", "HELL", "\"Hello\" \"world\"",
"World hello", "vas\"a d:?*/\\", "\"World hello\""},
new String[] {}, f);
p.waitFor();
} else {
p = Runtime.getRuntime().exec(new String[] {
cmnd, "/C", "sh", "-c",
"echo $#; echo $0; echo $1; echo $2; echo $3; " +
"echo $4; echo $5; echo $6; echo $7",
"Hello", "HELL", "\"Hello\" \"world\"",
"World hello", "vas\"a d:?*/\\", "\"World
hello\""});
if (p.waitFor() != 0) {
fail("check002: sh.exe seems to have not been found " +
"by default! Please, set the path to sh.exe" +
" via java.library.path property.");
}
}
Was this test previously excluded?
-Nathan
Re: [drlvm] Is Cygwin required for kernel.test?
Posted by Nathan Beyer <nd...@apache.org>.
I'm cleaning up the test right now; it seems this is just one of a
number of failing DRLVM tests that need to be fixed. I'm not changing
things dramatically.
Once I commit it, post any comments about the code and we can continue
to tweak it.
-Nathan
On 4/8/07, Alexey Varlamov <al...@gmail.com> wrote:
> 2007/4/8, Mikhail Fursov <mi...@gmail.com>:
> > IMO it's really bad test
> > and it worth to be rewritten. Why does it have "C:\\CygWin\bin" file
> > check with an equal code in if/else blocks?
> >
> > Instead of sh.exe we can put simple "cmd /C echo Hello World" for Windows
>
> +1
> A new JIRA issue seems to be the best way go further.
>
>
> >
> > On 4/8/07, Nathan Beyer <nd...@apache.org> wrote:
> > >
> > > Does the java.lang.RuntimeTest2 kernel.test in DRLVM require Cygwin to
> > > work in a Windows OS? I'm recieving the following failure from the
> > > test_exec_Str_F2T1S2Z test method.
> > >
> > > check002: sh.exe seems to have not been found by default! Please, set
> > > the path to sh.exe via java.library.path property.
> > >
> > > I looked at the code and I don't see how this bit of code could ever
> > > succeed in a Windows environment without Cygwin.
> > >
> > > File f = new java.io.File("C:\\CygWin\\bin");
> > > Process p;
> > > if (f.exists()) {
> > > p = Runtime.getRuntime().exec(new String[] {
> > > cmnd, "/C", "sh", "-c",
> > > "echo $#; echo $0; echo $1; echo $2; echo $3;
> > > " +
> > > "echo $4; echo $5; echo $6; echo $7",
> > > "Hello", "HELL", "\"Hello\" \"world\"",
> > > "World hello", "vas\"a d:?*/\\", "\"World
> > > hello\""},
> > > new String[] {}, f);
> > > p.waitFor();
> > > } else {
> > > p = Runtime.getRuntime().exec(new String[] {
> > > cmnd, "/C", "sh", "-c",
> > > "echo $#; echo $0; echo $1; echo $2; echo $3;
> > > " +
> > > "echo $4; echo $5; echo $6; echo $7",
> > > "Hello", "HELL", "\"Hello\" \"world\"",
> > > "World hello", "vas\"a d:?*/\\", "\"World
> > > hello\""});
> > > if (p.waitFor() != 0) {
> > > fail("check002: sh.exe seems to have not been
> > > found " +
> > > "by default! Please, set the path to
> > > sh.exe" +
> > > " via java.library.path property.");
> > > }
> > > }
> > >
> > >
> > > Was this test previously excluded?
> > > -Nathan
> > >
> >
> >
> >
> > --
> > Mikhail Fursov
> >
>
Re: [drlvm] Is Cygwin required for kernel.test?
Posted by Alexey Varlamov <al...@gmail.com>.
2007/4/8, Mikhail Fursov <mi...@gmail.com>:
> IMO it's really bad test
> and it worth to be rewritten. Why does it have "C:\\CygWin\bin" file
> check with an equal code in if/else blocks?
>
> Instead of sh.exe we can put simple "cmd /C echo Hello World" for Windows
+1
A new JIRA issue seems to be the best way go further.
>
> On 4/8/07, Nathan Beyer <nd...@apache.org> wrote:
> >
> > Does the java.lang.RuntimeTest2 kernel.test in DRLVM require Cygwin to
> > work in a Windows OS? I'm recieving the following failure from the
> > test_exec_Str_F2T1S2Z test method.
> >
> > check002: sh.exe seems to have not been found by default! Please, set
> > the path to sh.exe via java.library.path property.
> >
> > I looked at the code and I don't see how this bit of code could ever
> > succeed in a Windows environment without Cygwin.
> >
> > File f = new java.io.File("C:\\CygWin\\bin");
> > Process p;
> > if (f.exists()) {
> > p = Runtime.getRuntime().exec(new String[] {
> > cmnd, "/C", "sh", "-c",
> > "echo $#; echo $0; echo $1; echo $2; echo $3;
> > " +
> > "echo $4; echo $5; echo $6; echo $7",
> > "Hello", "HELL", "\"Hello\" \"world\"",
> > "World hello", "vas\"a d:?*/\\", "\"World
> > hello\""},
> > new String[] {}, f);
> > p.waitFor();
> > } else {
> > p = Runtime.getRuntime().exec(new String[] {
> > cmnd, "/C", "sh", "-c",
> > "echo $#; echo $0; echo $1; echo $2; echo $3;
> > " +
> > "echo $4; echo $5; echo $6; echo $7",
> > "Hello", "HELL", "\"Hello\" \"world\"",
> > "World hello", "vas\"a d:?*/\\", "\"World
> > hello\""});
> > if (p.waitFor() != 0) {
> > fail("check002: sh.exe seems to have not been
> > found " +
> > "by default! Please, set the path to
> > sh.exe" +
> > " via java.library.path property.");
> > }
> > }
> >
> >
> > Was this test previously excluded?
> > -Nathan
> >
>
>
>
> --
> Mikhail Fursov
>
Re: [drlvm] Is Cygwin required for kernel.test?
Posted by Mikhail Fursov <mi...@gmail.com>.
IMO it's really bad test
and it worth to be rewritten. Why does it have "C:\\CygWin\bin" file
check with an equal code in if/else blocks?
Instead of sh.exe we can put simple "cmd /C echo Hello World" for Windows
On 4/8/07, Nathan Beyer <nd...@apache.org> wrote:
>
> Does the java.lang.RuntimeTest2 kernel.test in DRLVM require Cygwin to
> work in a Windows OS? I'm recieving the following failure from the
> test_exec_Str_F2T1S2Z test method.
>
> check002: sh.exe seems to have not been found by default! Please, set
> the path to sh.exe via java.library.path property.
>
> I looked at the code and I don't see how this bit of code could ever
> succeed in a Windows environment without Cygwin.
>
> File f = new java.io.File("C:\\CygWin\\bin");
> Process p;
> if (f.exists()) {
> p = Runtime.getRuntime().exec(new String[] {
> cmnd, "/C", "sh", "-c",
> "echo $#; echo $0; echo $1; echo $2; echo $3;
> " +
> "echo $4; echo $5; echo $6; echo $7",
> "Hello", "HELL", "\"Hello\" \"world\"",
> "World hello", "vas\"a d:?*/\\", "\"World
> hello\""},
> new String[] {}, f);
> p.waitFor();
> } else {
> p = Runtime.getRuntime().exec(new String[] {
> cmnd, "/C", "sh", "-c",
> "echo $#; echo $0; echo $1; echo $2; echo $3;
> " +
> "echo $4; echo $5; echo $6; echo $7",
> "Hello", "HELL", "\"Hello\" \"world\"",
> "World hello", "vas\"a d:?*/\\", "\"World
> hello\""});
> if (p.waitFor() != 0) {
> fail("check002: sh.exe seems to have not been
> found " +
> "by default! Please, set the path to
> sh.exe" +
> " via java.library.path property.");
> }
> }
>
>
> Was this test previously excluded?
> -Nathan
>
--
Mikhail Fursov