#NEWLINE# def testrun( args ) : #NEWLINE# #INDENT# 'testrun subcommand.\n\n    Runs the command with the tracer using a temporary sqlite3 database, then\n    reads it and dumps it out.\n\n    Not really useful, except for debugging.\n    ' #NEWLINE# ( fd , database ) = Path . tempfile ( prefix = 'reprozip_' , suffix = '.sqlite3' ) #NEWLINE# os . close ( fd ) #NEWLINE# try : #NEWLINE# #INDENT# if ( args . arg0 is not None ) : #NEWLINE# #INDENT# argv = ( [ args . arg0 ] + args . cmdline [ 1 : ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# argv = args . cmdline #NEWLINE# #UNINDENT# logging . debug ( 'Starting tracer, binary=%r, argv=%r' , args . cmdline [ 0 ] , argv ) #NEWLINE# c = _pytracer . execute ( args . cmdline [ 0 ] , argv , database . path , args . verbosity ) #NEWLINE# print ( '\n\n-------------------------------------------------------------------------------' ) #NEWLINE# print_db ( database ) #NEWLINE# if ( c != 0 ) : #NEWLINE# #INDENT# if ( c & 256 ) : #NEWLINE# #INDENT# print ( ( '\nWarning: program appears to have been terminated by signal %d' % ( c & 255 ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( ( '\nWarning: program exited with non-zero code %d' % c ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# database . remove ( )