/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2011, International Business Machines Corporation and
+ * Copyright (c) 1997-2012, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
errorCount = 0;
dataErrorCount = 0;
verbose = FALSE;
+ no_time = FALSE;
no_err_msg = FALSE;
warn_on_missing_data = FALSE;
quick = FALSE;
return rval;
}
+UBool IntlTest::setNotime( UBool no_time )
+{
+ UBool rval = this->no_time;
+ this->no_time = no_time;
+ return rval;
+}
+
UBool IntlTest::setWarnOnMissingData( UBool warn_on_missing_dataVal )
{
UBool rval = this->warn_on_missing_data;
UDate timeStop = uprv_getRawUTCtime();
rval = TRUE; // at least one test has been called
char secs[256];
- sprintf(secs, "%f", (timeStop-timeStart)/1000.0);
+ if(!no_time) {
+ sprintf(secs, "%f", (timeStop-timeStart)/1000.0);
+ } else {
+ secs[0]=0;
+ }
strcpy(saveBaseLoc,name);
if (lastErrorCount == errorCount) {
sprintf( msg, " } OK: %s ", name );
- str_timeDelta(msg+strlen(msg),timeStop-timeStart);
+ if(!no_time) str_timeDelta(msg+strlen(msg),timeStop-timeStart);
lastTestFailed = FALSE;
}else{
sprintf(msg, " } ERRORS (%li) in %s", (long)(errorCount-lastErrorCount), name);
- str_timeDelta(msg+strlen(msg),timeStop-timeStart);
+ if(!no_time) str_timeDelta(msg+strlen(msg),timeStop-timeStart);
for(int i=0;i<LL_indentlevel;i++) {
errorList += " ";
UBool all = FALSE;
UBool verbose = FALSE;
UBool no_err_msg = FALSE;
+ UBool no_time = FALSE;
UBool quick = TRUE;
UBool name = FALSE;
UBool leaks = FALSE;
else if (strcmp("leaks", str) == 0 ||
strcmp("l", str) == 0)
leaks = TRUE;
+ else if (strcmp("notime", str) == 0 ||
+ strcmp("T", str) == 0)
+ no_time = TRUE;
else if (strcmp("x", str)==0) {
if(++i>=argc) {
printf("* Error: '-x' option requires an argument. usage: '-x outfile.xml'.\n");
"### \n"
"### Options are: verbose (v), all (a), noerrormsg (n), \n"
"### exhaustive (e), leaks (l), -x xmlfile.xml, prop:<propery>=<value>, \n"
+ "### notime (T), \n"
"### threads:<threadCount> (Mulithreading must first be \n"
"### enabled otherwise this will be ignored. \n"
"### The default thread count is 1.),\n"
major.setLeaks( leaks );
major.setThreadCount( threadCount );
major.setWarnOnMissingData( warnOnMissingData );
+ major.setNotime (no_time);
for (int32_t i = 0; i < nProps; i++) {
major.setProperty(props[i]);
}
fprintf(stdout, " No error messages (n) : %s\n", (no_err_msg? "On" : "Off"));
fprintf(stdout, " Exhaustive (e) : %s\n", (!quick? "On" : "Off"));
fprintf(stdout, " Leaks (l) : %s\n", (leaks? "On" : "Off"));
+ fprintf(stdout, " notime (T) : %s\n", (no_time? "On" : "Off"));
fprintf(stdout, " Warn on missing data (w) : %s\n", (warnOnMissingData? "On" : "Off"));
#if (ICU_USE_THREADS==0)
fprintf(stdout, " Threads : Disabled\n");
if (execCount <= 0) {
fprintf(stdout, "***** Not all called tests actually exist! *****\n");
}
- endTime = uprv_getRawUTCtime();
- diffTime = (int32_t)(endTime - startTime);
- printf("Elapsed Time: %02d:%02d:%02d.%03d\n",
- (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR),
- (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE),
- (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND),
- (int)(diffTime%U_MILLIS_PER_SECOND));
+ if(!no_time) {
+ endTime = uprv_getRawUTCtime();
+ diffTime = (int32_t)(endTime - startTime);
+ printf("Elapsed Time: %02d:%02d:%02d.%03d\n",
+ (int)((diffTime%U_MILLIS_PER_DAY)/U_MILLIS_PER_HOUR),
+ (int)((diffTime%U_MILLIS_PER_HOUR)/U_MILLIS_PER_MINUTE),
+ (int)((diffTime%U_MILLIS_PER_MINUTE)/U_MILLIS_PER_SECOND),
+ (int)(diffTime%U_MILLIS_PER_SECOND));
+ }
if(ctest_xml_fini())
return 1;