[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Time taken to execute the test suite

From: Branko Cibej <brane_at_xbc.nu>
Date: Thu, 08 Oct 2009 12:25:33 +0200

Bhuvaneswaran A wrote:
> Thank you for the review comments, Branko.
>
> On Thu, 2009-10-08 at 11:41 +0200, Branko ─îibej wrote:
>
>>> if progbase[-3:] == '.py':
>>> progname = sys.executable
>>> cmdline = [quote(progname),
>>> @@ -255,10 +257,14 @@
>>> print(TextColors.FAILURE + 'FAILURE' + TextColors.ENDC)
>>> else:
>>> print(TextColors.SUCCESS + 'success' + TextColors.ENDC)
>>> + endtime = int(time.time())
>>> + epoch = endtime - starttime
>>> + (hrs, mins, secs) = ((epoch/(60*60))%24, (epoch/60)%60, epoch%60)
>>> + total_time = "%02d:%02d:%02d" % (hrs, mins, secs)
>>>
>> elapsed_time = time.strftime('%H:%M:%S', time.time() - start_time)
>>
>
> The argument to time.strftime() method should be of type "list", not
> "float". The above change complains:
> File "./build/run_tests.py", line 260, in _run_test
> elapsed_time = time.strftime('%H:%M:%S', time.time() - start_time)
> TypeError: argument must be 9-item sequence, not float
> make: *** [check] Error 1
>

Duh, of course I meant:

elapsed_time = time.strftime('%H:%M:%S', time.gmtime(time.time() -
start_time))

> May I incorporate rest of your review comments and attach the patch?
>

Of course.

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404894
Received on 2009-10-08 12:25:55 CEST

This is an archived mail posted to the Subversion Dev mailing list.