256 OutputAnalyzer oa = ProcessTools.executeTestJvm(cmds);
257 String output = oa.getOutput();
258 oa.shouldHaveExitValue(0);
259 System.out.println(output);
260 } else {
261 System.out.println("Scenario #" + i + " is skipped due to -Dscenarios=" + SCENARIOS);
262 }
263 }
264 }
265
266 protected ValueTypeTest() {
267 List<String> list = null;
268 List<String> exclude = null;
269 if (!TESTLIST.isEmpty()) {
270 list = Arrays.asList(TESTLIST.split(","));
271 }
272 if (!EXCLUDELIST.isEmpty()) {
273 exclude = Arrays.asList(EXCLUDELIST.split(","));
274 }
275 // Gather all test methods and put them in Hashtable
276 for (Method m : getClass().getMethods()) {
277 Test[] annos = m.getAnnotationsByType(Test.class);
278 if (annos.length != 0 &&
279 ((list == null || list.contains(m.getName())) && (exclude == null || !exclude.contains(m.getName())))) {
280 tests.put(getClass().getSimpleName() + "::" + m.getName(), m);
281 }
282 }
283 }
284
285 protected void run(String[] args, Class<?>... classes) throws Throwable {
286 if (args.length == 0) {
287 // Spawn a new VM instance
288 execute_vm();
289 } else {
290 // Execute tests
291 run(classes);
292 }
293 }
294
295 private void execute_vm() throws Throwable {
296 Asserts.assertFalse(tests.isEmpty(), "no tests to execute");
|
256 OutputAnalyzer oa = ProcessTools.executeTestJvm(cmds);
257 String output = oa.getOutput();
258 oa.shouldHaveExitValue(0);
259 System.out.println(output);
260 } else {
261 System.out.println("Scenario #" + i + " is skipped due to -Dscenarios=" + SCENARIOS);
262 }
263 }
264 }
265
266 protected ValueTypeTest() {
267 List<String> list = null;
268 List<String> exclude = null;
269 if (!TESTLIST.isEmpty()) {
270 list = Arrays.asList(TESTLIST.split(","));
271 }
272 if (!EXCLUDELIST.isEmpty()) {
273 exclude = Arrays.asList(EXCLUDELIST.split(","));
274 }
275 // Gather all test methods and put them in Hashtable
276 for (Method m : getClass().getDeclaredMethods()) {
277 Test[] annos = m.getAnnotationsByType(Test.class);
278 if (annos.length != 0 &&
279 ((list == null || list.contains(m.getName())) && (exclude == null || !exclude.contains(m.getName())))) {
280 tests.put(getClass().getSimpleName() + "::" + m.getName(), m);
281 }
282 }
283 }
284
285 protected void run(String[] args, Class<?>... classes) throws Throwable {
286 if (args.length == 0) {
287 // Spawn a new VM instance
288 execute_vm();
289 } else {
290 // Execute tests
291 run(classes);
292 }
293 }
294
295 private void execute_vm() throws Throwable {
296 Asserts.assertFalse(tests.isEmpty(), "no tests to execute");
|