88 return Status.error("Unrecognized number of repetitions: " + repeat);
89 }
90 }
91 }
92
93 // Next must come the executeClass
94 if (i < args.length) {
95 className = args[i];
96 i++;
97 } else
98 return Status.failed("No executeClass specified");
99
100 // Finally, any optional args
101 if (i < args.length) {
102 executeArgs = new String[args.length - i];
103 System.arraycopy(args, i, executeArgs, 0, executeArgs.length);
104 }
105
106 Status status = null;
107 try {
108 Class c;
109 if (loader == null)
110 c = Class.forName(className);
111 else
112 c = loader.loadClass(className);
113
114 Status prevStatus = null;
115 for (int j = 0; j < repeat; j++) {
116 if (repeat > 1)
117 log.println("iteration: " + (j+1));
118
119 Test t = (Test) (c.newInstance());
120 status = t.run(executeArgs, log, ref);
121
122 if (repeat > 1)
123 log.println(" " + status);
124
125 if ((prevStatus != null) && status.getType() != prevStatus.getType())
126 status = Status.error("Return status type changed at repetition: " + (j+1));
127
128 if (status.isError())
|
88 return Status.error("Unrecognized number of repetitions: " + repeat);
89 }
90 }
91 }
92
93 // Next must come the executeClass
94 if (i < args.length) {
95 className = args[i];
96 i++;
97 } else
98 return Status.failed("No executeClass specified");
99
100 // Finally, any optional args
101 if (i < args.length) {
102 executeArgs = new String[args.length - i];
103 System.arraycopy(args, i, executeArgs, 0, executeArgs.length);
104 }
105
106 Status status = null;
107 try {
108 Class<?> c;
109 if (loader == null)
110 c = Class.forName(className);
111 else
112 c = loader.loadClass(className);
113
114 Status prevStatus = null;
115 for (int j = 0; j < repeat; j++) {
116 if (repeat > 1)
117 log.println("iteration: " + (j+1));
118
119 Test t = (Test) (c.newInstance());
120 status = t.run(executeArgs, log, ref);
121
122 if (repeat > 1)
123 log.println(" " + status);
124
125 if ((prevStatus != null) && status.getType() != prevStatus.getType())
126 status = Status.error("Return status type changed at repetition: " + (j+1));
127
128 if (status.isError())
|