summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.mauve/DejaGNUTestHarness.java
blob: 91817e6fa1d197ee8c17088f0c25ba4ff2295cb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 1998, 1999  Free Software Foundation

// Written by Tom Tromey <tromey@cygnus.com>

import gnu.testlet.*;

public class DejaGNUTestHarness extends SimpleTestHarness
{
  static String dejasrcdir;

  public String getSourceDirectory ()
  {
    return dejasrcdir;
  }

  private DejaGNUTestHarness ()
  {
    super (/* verbose */ true, /* debug */ false);
  }

  public static void main (String[] args)
  {
    dejasrcdir = args.length > 0 ? args[0] : "";
    DejaGNUTestHarness harness = new DejaGNUTestHarness ();
    // This might seem weird, given that we check args.length above.
    // However, in some cases the expect code rewrites this runtest
    // invocation to have an explicit name for the test to run.
    harness.runtest (args[1]);
    System.exit(harness.done());
  }
}