Changeset 999687e
- Timestamp:
- 12/06/10 15:25:00 (2 years ago)
- Branches:
- master, external, fix-prolong, refactor, refactor-ext, refactor-subsolvers
- Children:
- ee6f189
- Parents:
- 52a2f01
- git-author:
- Oleg Batrashev <ogbash@…> (12/06/10 15:25:00)
- git-committer:
- Oleg Batrashev <ogbash@…> (12/06/10 15:25:00)
- File:
-
- 1 edited
-
scripts/testcompare.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/testcompare.py
r1ac1f40 r999687e 3 3 import MySQLdb 4 4 import sys 5 import getopt 5 6 import logging 6 7 logging.basicConfig() … … 8 9 9 10 from doug import testmysql 11 from doug.config import DOUGConfigParser 12 13 def usage(): 14 sys.stderr.write("Usage: %s\n" 15 "\t [--conf=<filename>]...\n" 16 % (sys.argv[0],)) 17 18 19 try: 20 opts, extra = getopt.getopt(sys.argv[1:], "", ["conf="]) 21 except getopt.GetoptError: 22 usage() 23 sys.exit(1) 24 25 if len(extra)>0: 26 usage() 27 sys.exit(1) 28 29 confFileNames = [] 30 for opt in opts: 31 if opt[0]=="--conf": 32 confFileNames.append(opt[1]) 33 34 # config and tar file 35 conf = DOUGConfigParser() 36 conf.read(confFileNames) 37 38 host = conf.get("testscript", "mysql-host") 39 user = conf.get("testscript", "mysql-user") 40 password = conf.get("testscript", "mysql-password") 41 database = conf.get("testscript", "mysql-database") 10 42 11 43 class TestResult: … … 93 125 def login(): 94 126 global connection 95 print "Enter mysql password:" 96 password = sys.stdin.readline().strip() 97 98 connection = MySQLdb.connect('localhost', 'dougtester', password, 'dougtests') 127 connection = MySQLdb.connect(host, user, password, database) 99 128 100 129 login()
Note: See TracChangeset
for help on using the changeset viewer.
