mirror of https://github.com/ARMmbed/mbed-os.git
Unlocked --db switch. Added check when parsing DB connection string
parent
197a1afe5e
commit
f7f79866d1
|
@ -1299,9 +1299,11 @@ def factory_db_logger(db_url):
|
|||
"""
|
||||
if db_url is not None:
|
||||
from workspace_tools.test_mysql import MySQLDBAccess
|
||||
(db_type, username, password, host, db_name) = BaseDBAccess().parse_db_connection_string(db_url)
|
||||
if db_type == 'mysql':
|
||||
return MySQLDBAccess()
|
||||
connection_info = BaseDBAccess().parse_db_connection_string(db_url)
|
||||
if connection_info is not None:
|
||||
(db_type, username, password, host, db_name) = BaseDBAccess().parse_db_connection_string(db_url)
|
||||
if db_type == 'mysql':
|
||||
return MySQLDBAccess()
|
||||
return None
|
||||
|
||||
|
||||
|
@ -1482,9 +1484,9 @@ def get_default_test_options_parser():
|
|||
type="int",
|
||||
help='You can increase global timeout for each test by specifying additional test timeout in seconds')
|
||||
|
||||
#parser.add_option('', '--db',
|
||||
# dest='db_url',
|
||||
# help='This specifies what database test suite uses to store its state. To pass DB connection info use database connection string. Example: \'mysql://username:password@127.0.0.1/db_name\'')
|
||||
parser.add_option('', '--db',
|
||||
dest='db_url',
|
||||
help='This specifies what database test suite uses to store its state. To pass DB connection info use database connection string. Example: \'mysql://username:password@127.0.0.1/db_name\'')
|
||||
|
||||
parser.add_option('-l', '--log',
|
||||
dest='log_file_name',
|
||||
|
|
Loading…
Reference in New Issue