int TestSuite_Run (TestSuite *suite) /* IN */ { if ((suite->flags & TEST_HELPONLY)) { TestSuite_PrintHelp (suite, stderr); return 0; } TestSuite_PrintJsonHeader (suite, stdout); if (suite->outfile) { TestSuite_PrintJsonHeader (suite, suite->outfile); } if (suite->tests) { if (suite->testname) { TestSuite_RunNamed (suite, suite->testname); } else if ((suite->flags & TEST_NOTHREADS)) { TestSuite_RunSerial (suite); } else { TestSuite_RunParallel (suite); } } else { TestSuite_PrintJsonFooter (stdout); if (suite->outfile) { TestSuite_PrintJsonFooter (suite->outfile); } } return 0; }
int TestSuite_Run (TestSuite *suite) /* IN */ { int failures = 0; if ((suite->flags & TEST_HELPONLY)) { TestSuite_PrintHelp (suite, stderr); return 0; } if (!suite->silent) { TestSuite_PrintJsonHeader (suite, stdout); if (suite->outfile) { TestSuite_PrintJsonHeader (suite, suite->outfile); } } if (suite->tests) { if (suite->testname) { failures += TestSuite_RunNamed (suite, suite->testname); } else { failures += TestSuite_RunSerial (suite); } } else if (!suite->silent) { TestSuite_PrintJsonFooter (stdout); if (suite->outfile) { TestSuite_PrintJsonFooter (suite->outfile); } } return failures; }
int TestSuite_Run (TestSuite *suite) /* IN */ { if ((suite->flags & TEST_HELPONLY)) { TestSuite_PrintHelp (suite, stderr); return 0; } TestSuite_PrintJsonHeader (suite, stdout); if (suite->outfile) { if (suite->generatexmlreport){ TestSuite_PrintXmlHeader (suite, suite->outfile); }else{ TestSuite_PrintJsonHeader (suite, suite->outfile); } } if (suite->tests) { if (suite->testname) { suite->testcasesnum = 1; TestSuite_RunNamed (suite, suite->testname); } else if ((suite->flags & TEST_NOTHREADS)) { TestSuite_RunSerial (suite); } else { TestSuite_RunParallel (suite); } } else { TestSuite_PrintJsonFooter (stdout); if (suite->outfile) { if (!suite->generatexmlreport){ TestSuite_PrintJsonFooter (suite->outfile); } } } if (suite->outfile) { if (suite->generatexmlreport){ TestSuite_PrintXmlFooter (suite, suite->outfile); } } return 0; }