<s> import autopath <EOL> import py <EOL> import sys <EOL> mydir = py . magic . autopath ( ) . dirpath ( ) . realpath ( ) <EOL> from pypy . tool . pytest import htmlreport <EOL> from pypy . tool . pytest import confpath <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> if len ( sys . argv ) > <NUM_LIT:1> : <EOL> testresultdir = py . path . local ( sys . argv [ <NUM_LIT:1> ] ) <EOL> assert testresultdir . check ( dir = <NUM_LIT:1> ) <EOL> else : <EOL> testresultdir = confpath . testresultdir <EOL> assert testresultdir . check ( dir = <NUM_LIT:1> ) <EOL> try : <EOL> resultwc = py . path . svnwc ( testresultdir ) <EOL> print "<STR_LIT>" , resultwc <EOL> resultwc . update ( ) <EOL> except KeyboardInterrupt , RuntimeError : <EOL> raise <EOL> except Exception , e : <EOL> print >> sys . stderr , "<STR_LIT>" , e <EOL> print "<STR_LIT>" , mydir <EOL> rep = htmlreport . HtmlReport ( testresultdir ) <EOL> rep . parselatest ( ) <EOL> print "<STR_LIT>" <EOL> rep . makeindex ( testresultdir . join ( '<STR_LIT>' ) ) </s>
