aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2000-12-16 19:02:54 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-12-16 19:02:54 +0000
commit68c7dea8eda115ed3056df1f127e0fcd7f43a443 (patch)
treeb49c7e68a96cfbcd7b79d484314e0561680cbf08 /libjava/testsuite
parent2bed3391384aef335885b8271a085e1c18f3d0f1 (diff)
downloadgcc-68c7dea8eda115ed3056df1f127e0fcd7f43a443.zip
gcc-68c7dea8eda115ed3056df1f127e0fcd7f43a443.tar.gz
gcc-68c7dea8eda115ed3056df1f127e0fcd7f43a443.tar.bz2
libjava.exp (test_libjava_from_javac): Strange quoting trick for `.class' link case.
* lib/libjava.exp (test_libjava_from_javac): Strange quoting trick for `.class' link case. (bytecompile_file): Change directory outside of `catch'. * libjava.lang/Thread_1.java: Removed. * libjava.lang/Thread_1.out: Likewise. * libjava.lang/N19990310_4.xfail: New file. * libjava.lang/stub.xfail: Added new failure modes. * libjava.lang/stringconst.xfail: New file. * libjava.lang/PR162.xfail: New file. * libjava.lang/Final.xfail: Removed. From-SVN: r38311
Diffstat (limited to 'libjava/testsuite')
-rw-r--r--libjava/testsuite/ChangeLog15
-rw-r--r--libjava/testsuite/lib/libjava.exp19
-rw-r--r--libjava/testsuite/libjava.lang/N19990310_4.xfail (renamed from libjava/testsuite/libjava.lang/Final.xfail)0
-rw-r--r--libjava/testsuite/libjava.lang/PR162.xfail1
-rw-r--r--libjava/testsuite/libjava.lang/Thread_1.java184
-rw-r--r--libjava/testsuite/libjava.lang/Thread_1.out9
-rw-r--r--libjava/testsuite/libjava.lang/stringconst.xfail1
-rw-r--r--libjava/testsuite/libjava.lang/stub.xfail2
8 files changed, 30 insertions, 201 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index 55b3f55..eb20307 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,18 @@
+2000-12-16 Tom Tromey <tromey@redhat.com>
+
+ * lib/libjava.exp (test_libjava_from_javac): Strange quoting trick
+ for `.class' link case.
+ (bytecompile_file): Change directory outside of `catch'.
+
+ * libjava.lang/Thread_1.java: Removed.
+ * libjava.lang/Thread_1.out: Likewise.
+
+ * libjava.lang/N19990310_4.xfail: New file.
+ * libjava.lang/stub.xfail: Added new failure modes.
+ * libjava.lang/stringconst.xfail: New file.
+ * libjava.lang/PR162.xfail: New file.
+ * libjava.lang/Final.xfail: Removed.
+
2000-12-15 Tom Tromey <tromey@redhat.com>
* libjava.lang/instinit.out: Removed erroneous line.
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index e6b3744..085fdc2 100644
--- a/libjava/testsuite/lib/libjava.exp
+++ b/libjava/testsuite/lib/libjava.exp
@@ -18,8 +18,6 @@ proc libjava_tcompile {source destfile type options} {
# This strange-looking expression really does quote the `$'.
regsub -all -- {\$} $source {\$} source
regsub -all -- {\$} $destfile {\$} destfile
- verbose "Now source = $source"
- verbose "Now destfile = $destfile"
return [target_compile $source $destfile $type $options]
}
@@ -88,19 +86,17 @@ proc bytecompile_file { file objdir {classpath {}} } {
if {$classpath != ""} then {
set env(CLASSPATH) $classpath
}
+ set here [pwd]
+ cd $dirname
if {[catch {
- set here [pwd]
- cd $dirname
set q [eval exec "$javac [list $file] -d $objdir 2>@ stdout"]
- cd $here
- # "return" a result
- set q $q
} msg]} then {
verbose "couldn't compile $file: $msg"
set r 0
} else {
set r 1
}
+ cd $here
return $r
}
@@ -581,8 +577,15 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
}
}
} else {
+ # This is no evil: we de-listify CLASS_FILES so that we can
+ # turn around and quote the `$' in it for the shell. I really
+ # hate DejaGNU. It is so !@#$!@# unpredictable.
+ set hack ""
+ foreach stupid $class_files {
+ set hack "$hack $stupid"
+ }
set x [prune_warnings \
- [libjava_tcompile $class_files "$executable" $type $args]]
+ [libjava_tcompile $hack "$executable" $type $args]]
}
if {[info exists opts(xfail-byte)]} {
setup_xfail *-*-*
diff --git a/libjava/testsuite/libjava.lang/Final.xfail b/libjava/testsuite/libjava.lang/N19990310_4.xfail
index c999f8e..c999f8e 100644
--- a/libjava/testsuite/libjava.lang/Final.xfail
+++ b/libjava/testsuite/libjava.lang/N19990310_4.xfail
diff --git a/libjava/testsuite/libjava.lang/PR162.xfail b/libjava/testsuite/libjava.lang/PR162.xfail
new file mode 100644
index 0000000..c999f8e
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/PR162.xfail
@@ -0,0 +1 @@
+xfail-output
diff --git a/libjava/testsuite/libjava.lang/Thread_1.java b/libjava/testsuite/libjava.lang/Thread_1.java
deleted file mode 100644
index 42f8c84..0000000
--- a/libjava/testsuite/libjava.lang/Thread_1.java
+++ /dev/null
@@ -1,184 +0,0 @@
-// Various thread tests.
-
-public class Thread_1 extends Thread
-{
- // The group for the workers.
- static ThreadGroup subgroup;
-
- // Which piece of test code to try.
- static int test_case;
-
- // Names of the tests.
- static final int JOIN_GOOD = 0;
- static final int JOIN_TIMEOUT = 1;
- static final int JOIN_INTERRUPTED = 2;
- static final int THREAD_EXIT = 3;
-
- // True if this is normal; false if daemon.
- boolean normal;
- // The other thread in the test.
- Thread_1 other;
- // True when the thread has entered run().
- boolean started;
-
- public void run ()
- {
- try
- {
- if (normal)
- {
- System.out.println ("test " + test_case);
- // Tell the main thread to start the daemon thread.
- synchronized (this)
- {
- started = true;
- notify ();
- }
- // Now wait for daemon to start.
- synchronized (other)
- {
- while (! other.started)
- other.wait ();
- }
- switch (test_case)
- {
- case JOIN_GOOD:
- other.join ();
- System.out.println ("joined");
- break;
- case JOIN_TIMEOUT:
- other.join (10);
- System.out.println (other.isAlive());
- other.join ();
- break;
- case JOIN_INTERRUPTED:
- other.join ();
- System.out.println ("joined");
- break;
- case THREAD_EXIT:
- // Nothing.
- break;
-
- default:
- System.out.println ("failure");
- break;
- }
- }
- else
- {
- // Let the normal thread start first.
- synchronized (other)
- {
- while (! other.started)
- other.wait();
- }
- // Tell normal thread that we've started.
- synchronized (this)
- {
- started = true;
- notify ();
- }
- switch (test_case)
- {
- case JOIN_GOOD:
- System.out.println ("daemon done");
- break;
- case JOIN_TIMEOUT:
- sleep (50);
- break;
- case JOIN_INTERRUPTED:
- other.interrupt ();
- break;
- case THREAD_EXIT:
- // Wait for a while. However, don't wait indefinitely
- // -- we want this thread to terminate so that the
- // process won't hang if there is a bug.
- sleep (10000);
- System.out.println ("daemon still alive");
- break;
-
- default:
- System.out.println ("failure");
- break;
- }
- }
- }
- catch (InterruptedException e)
- {
- System.out.println ("interrupted");
- }
- }
-
- public void setOther (Thread_1 x)
- {
- other = x;
- }
-
- Thread_1 (String name, boolean x)
- {
- super (subgroup, name);
- normal = x;
- started = false;
- setDaemon (! normal);
- }
-
- // Run a single test.
- static Thread_1 doit (int what)
- {
- // FIXME: we used to just use the same threads each time. That
- // didn't work -- must debug.
- Thread_1 dt = new Thread_1 ("daemon", false);
- Thread_1 nt = new Thread_1 ("normal", true);
-
- dt.setOther(nt);
- nt.setOther(dt);
-
- test_case = what;
- try
- {
- nt.start();
- dt.start();
-
- // Don't wait for the threads if we're doing the exit test.
- if (what != THREAD_EXIT)
- {
- nt.join ();
- dt.join ();
- }
- }
- catch (InterruptedException e)
- {
- System.out.println ("caught bad exception");
- }
-
- return dt;
- }
-
- public static void main (String[] args)
- {
- subgroup = new ThreadGroup ("sub");
-
- doit (JOIN_GOOD);
-
- System.out.println ("active count = " + subgroup.activeCount ());
-
- Thread_1 dt = doit (JOIN_TIMEOUT);
- // Make sure that joining a dead thread works.
- System.out.println ("still alive: " + dt.isAlive ());
- try
- {
- dt.join ();
- }
- catch (InterruptedException e)
- {
- System.out.println ("exception caught");
- }
-
- doit (JOIN_INTERRUPTED);
-
- // Note: this test has a race conditoin. So we don't run it any
- // more.
- // This test must come last.
- // doit (THREAD_EXIT);
- }
-}
diff --git a/libjava/testsuite/libjava.lang/Thread_1.out b/libjava/testsuite/libjava.lang/Thread_1.out
deleted file mode 100644
index 6238548..0000000
--- a/libjava/testsuite/libjava.lang/Thread_1.out
+++ /dev/null
@@ -1,9 +0,0 @@
-test 0
-daemon done
-joined
-active count = 0
-test 1
-true
-still alive: false
-test 2
-interrupted
diff --git a/libjava/testsuite/libjava.lang/stringconst.xfail b/libjava/testsuite/libjava.lang/stringconst.xfail
new file mode 100644
index 0000000..c999f8e
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/stringconst.xfail
@@ -0,0 +1 @@
+xfail-output
diff --git a/libjava/testsuite/libjava.lang/stub.xfail b/libjava/testsuite/libjava.lang/stub.xfail
index 81d6df0..bee72d3 100644
--- a/libjava/testsuite/libjava.lang/stub.xfail
+++ b/libjava/testsuite/libjava.lang/stub.xfail
@@ -1 +1,3 @@
xfail-byte
+xfail-gcj
+xfail-gcjC