DejaGNUTestHarness.java 801 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 1998, 1999 Free Software Foundation
  2. // Written by Tom Tromey <tromey@cygnus.com>
  3. import gnu.testlet.*;
  4. public class DejaGNUTestHarness extends SimpleTestHarness
  5. {
  6. static String dejasrcdir;
  7. public String getSourceDirectory ()
  8. {
  9. return dejasrcdir;
  10. }
  11. private DejaGNUTestHarness ()
  12. {
  13. super (/* verbose */ true, /* debug */ false);
  14. }
  15. public static void main (String[] args)
  16. {
  17. dejasrcdir = args.length > 0 ? args[0] : "";
  18. DejaGNUTestHarness harness = new DejaGNUTestHarness ();
  19. // This might seem weird, given that we check args.length above.
  20. // However, in some cases the expect code rewrites this runtest
  21. // invocation to have an explicit name for the test to run.
  22. harness.runtest (args[1]);
  23. System.exit(harness.done());
  24. }
  25. }