# HG changeset patch # User rosfran # Date 1179354118 -3600 # Node ID 1b7b4d7f714c0865894f1492c9dbd51ac136003c # Parent b51559fec601e5f569e4e604e10403ebfe404d7a [svn r683] More test configuration options. diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_connection.py --- a/gmyth/tests/test_connection.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_connection.py Wed May 16 23:21:58 2007 +0100 @@ -8,6 +8,7 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_connection', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_connection', ["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_file_download.py --- a/gmyth/tests/test_file_download.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_file_download.py Wed May 16 23:21:58 2007 +0100 @@ -8,7 +8,8 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_file_download', ["myth://%s:%s/1000_20070330144500.nuv" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_file_download', ["myth://%s:%s/%s" % (cfg_file.get_host(), cfg_file.get_port(), \ + cfg_file.get_filename())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_filelocal.py --- a/gmyth/tests/test_filelocal.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_filelocal.py Wed May 16 23:21:58 2007 +0100 @@ -8,6 +8,7 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_filelocal', ["myth://%s:%s/1000_20070330144500.nuv" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_filelocal', ["myth://%s:%s/%s" % (cfg_file.get_host(), cfg_file.get_port(), \ + cfg_file.get_filename())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_filetransfer.py --- a/gmyth/tests/test_filetransfer.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_filetransfer.py Wed May 16 23:21:58 2007 +0100 @@ -8,7 +8,8 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_filetransfer', ["myth://%s:%s/1000_20070330144500.nuv" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_filetransfer', ["myth://%s:%s/%s" % (cfg_file.get_host(), cfg_file.get_port(), \ + cfg_file.get_filename())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_livetv.py --- a/gmyth/tests/test_livetv.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_livetv.py Wed May 16 23:21:58 2007 +0100 @@ -8,14 +8,7 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) - -finish(p) - -p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) - -finish(p) - -p = start('gmyth_test_livetv', ['myth://%s:%s/livetv?channel=1' % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_livetv_stress.py --- a/gmyth/tests/test_livetv_stress.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_livetv_stress.py Wed May 16 23:21:58 2007 +0100 @@ -8,14 +8,17 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) finish(p) -p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) finish(p) -p = start('gmyth_test_livetv', ['myth://%s:%s/livetv?channel=1' % (cfg_file.get_host(), cfg_file.get_port())], 2) - +p = start('gmyth_test_livetv', ["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) + sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_main.py --- a/gmyth/tests/test_main.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_main.py Wed May 16 23:21:58 2007 +0100 @@ -8,6 +8,7 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('test', ["myth://%s:%s/1000_20070330144500.nuv" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('test', ["myth://%s:%s/%s" % (cfg_file.get_host(), cfg_file.get_port(), \ + cfg_file.get_filename())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_monitor_handler.py --- a/gmyth/tests/test_monitor_handler.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_monitor_handler.py Wed May 16 23:21:58 2007 +0100 @@ -8,14 +8,7 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_monitor_handler', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) - -finish(p) - -p = start('gmyth_test_monitor_handler', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) - -finish(p) - -p = start('gmyth_test_monitor_handler', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_monitor_handler', ["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_program_info.py --- a/gmyth/tests/test_program_info.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_program_info.py Wed May 16 23:21:58 2007 +0100 @@ -8,6 +8,7 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_program_info', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_program_info', ["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_recorder.py --- a/gmyth/tests/test_recorder.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_recorder.py Wed May 16 23:21:58 2007 +0100 @@ -8,7 +8,8 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_recorder', ["myth://%s:%s/livetv?channel=1" % (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_recorder',["myth://%s:%s/livetv?channel=%s" % (cfg_file.get_host(), \ + cfg_file.get_port(), cfg_file.get_tv_channel())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/test_recordings.py --- a/gmyth/tests/test_recordings.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/test_recordings.py Wed May 16 23:21:58 2007 +0100 @@ -8,7 +8,8 @@ cfg_file = TestConfigFile('test_scripts.cfg') -p = start('gmyth_test_recordings', ["myth://mythtv:mythtv@%s:%s/?mythconverg" % \ - (cfg_file.get_host(), cfg_file.get_port())], 2) +p = start('gmyth_test_recordings', ["myth://%s:%s@%s:%s/?%s" % \ + (cfg_file.get_db_user(), cfg_file.get_db_passwd(), cfg_file.get_host(), cfg_file.get_port(), \ + cfg_file.get_db_name())], 2) sys.exit(finish(p)) diff -r b51559fec601 -r 1b7b4d7f714c gmyth/tests/utils.py --- a/gmyth/tests/utils.py Wed May 16 21:56:47 2007 +0100 +++ b/gmyth/tests/utils.py Wed May 16 23:21:58 2007 +0100 @@ -11,6 +11,11 @@ else: self.host = '192.168.3.110' self.port = 6543 + self.db_user = 'mythtv' + self.db_passwd = 'mythtv' + self.db_name = 'mythconverg' + self.filename = '1004_20070510161500.nuv' + self.tv_channel = 13 def loadTestConfigFile(self, filename): """Load the test script's config data from a file.""" @@ -20,11 +25,21 @@ try: host = config.get("GMyth Test Scripts Config", "Host") port = config.get("GMyth Test Scripts Config", "Port") + db_user = config.get("GMyth Test Scripts Config", "User") + db_passwd = config.get("GMyth Test Scripts Config", "Password") + db_name = config.get("GMyth Test Scripts Config", "Database") + filename = config.get("GMyth Test Scripts Config", "Filename") + tv_channel = config.get("GMyth Test Scripts Config", "Channel") except: - raise "ConfigError", "Problems on configuration file (%s) " % filename + raise "ConfigError", "Problems on configuration file (%s)!!!" % filename else: self.host = host self.port = port + self.db_user = db_user + self.db_passwd = db_passwd + self.db_name = db_name + self.filename = filename + self.tv_channel = tv_channel else: print "Creating file %s..." % filename self.create() @@ -35,6 +50,21 @@ def get_port(self): return self.port + def get_filename(self): + return self.filename + + def get_db_user(self): + return self.db_user + + def get_db_passwd(self): + return self.db_passwd + + def get_db_name(self): + return self.db_name + + def get_tv_channel(self): + return self.tv_channel + def wait_string(file, string): while True: line = file.readline().strip()