File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44# See the file 'doc/COPYING' for copying permission
55
66import codecs
7+ import inspect
78import os
89import re
910import smtplib
1415from email .mime .multipart import MIMEMultipart
1516from email .mime .text import MIMEText
1617
17- sys .path .append (" ../../" )
18+ sys .path .append (os . path . normpath ( "%s/ ../../" % os . path . dirname ( inspect . getfile ( inspect . currentframe ()))) )
1819
1920from lib .core .revision import getRevisionNumber
2021
@@ -64,7 +65,7 @@ def main():
6465 test_counts = []
6566 attachments = {}
6667
67- command_line = "cd %s && python sqlmap.py --live-test" % SQLMAP_HOME
68+ command_line = "python /opt/sqlmap/ sqlmap.py --live-test" % SQLMAP_HOME
6869 proc = subprocess .Popen (command_line , shell = True , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
6970
7071 proc .wait ()
@@ -138,4 +139,13 @@ def main():
138139 send_email (msg )
139140
140141if __name__ == "__main__" :
141- main ()
142+ log_fd = open ("/tmp/regressiontest.txt" , "ab" )
143+ log_fd .write ("Regression test started at %s\n " % TIME )
144+
145+ try :
146+ main ()
147+ except Exception , e :
148+ log_fd .write ("An exception has occurred:\n %s" % str (traceback .format_exc ()))
149+
150+ log_fd .write ("\n Regression test finished at %s\n \n " % TIME )
151+ log_fd .close ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments