Skip to content

Commit

Permalink
#2231: fix browser commands generated, prettify output, use a test pr…
Browse files Browse the repository at this point in the history
…ofile with each browser, fix test error in finally block when the client command errors out (client_process never assigned)

git-svn-id: https://xpra.org/svn/Xpra/trunk@22517 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 23, 2019
1 parent f37d8bd commit c8a4ed3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/tests/xpra/perf_config_default.py
Expand Up @@ -192,7 +192,10 @@ def screensaver(x):

#XPRA_CLIENT_TYPES = ["python2", "html5"]
XPRA_CLIENT_TYPES = ["html5"]
XPRA_HTML5_BROWSERS = ["firefox", "google-chrome"]
XPRA_HTML5_BROWSERS = (
["firefox", "-P", "Test"],
["google-chrome", "--user-data-dir=~/Downloads/TEMP"],
)

XPRA_MDNS = False
TEST_SOUND = False
Expand Down Expand Up @@ -267,7 +270,7 @@ def print_options(self):
print("XPRA_OPENGL_OPTIONS: %s" % self.XPRA_OPENGL_OPTIONS)
print("XPRA_MDNS: %s" % self.XPRA_MDNS)
print("XPRA_CLIENT_TYPES: %s" % self.XPRA_CLIENT_TYPES)
print("XPRA_HTML5_BROWSERS: %s" % self.XPRA_HTML5_BROWSERS)
print("XPRA_HTML5_BROWSERS: %s" % (self.XPRA_HTML5_BROWSERS,))
print("TEST_SOUND: %s" % self.TEST_SOUND)
print("XVNC_BIN: %s" % self.XVNC_BIN)
print("XVNC_SERVER_START_COMMAND: %s" % self.XVNC_SERVER_START_COMMAND)
Expand Down
7 changes: 4 additions & 3 deletions src/tests/xpra/test_measure_perf.py
Expand Up @@ -355,6 +355,7 @@ def get_iptables_OUTPUT_count():

def measure_client(server_pid, name, cmd, get_stats_cb):
print("starting client: %s" % cmd)
client_process = None
try:
client_process = Popen(cmd)
#give it time to settle down:
Expand Down Expand Up @@ -418,7 +419,7 @@ def measure_client(server_pid, name, cmd, get_stats_cb):

def with_server(start_server_command, stop_server_commands, in_tests, get_stats_cb):
tests = in_tests[config.STARTING_TEST:config.LIMIT_TESTS]
print("going to run %s tests: %s" % (len(tests), [x[0] for x in tests]))
print("going to run %s tests: %s" % (len(tests), "\n* ".join(x[0] for x in tests)))
print("*******************************************")
print("ETA: %s minutes" % int((config.SERVER_SETTLE_TIME+config.DEFAULT_TEST_COMMAND_SETTLE_TIME+config.SETTLE_TIME+config.MEASURE_TIME+1)*len(tests)/60))
print("*******************************************")
Expand Down Expand Up @@ -847,8 +848,8 @@ def add_client_test(name, cmd):
elif client_type=="html5":
assert not config.XPRA_USE_PASSWORD
for browser_cmd in config.XPRA_HTML5_BROWSERS:
cmd += [browser_cmd, "http://localhost:%i/" % (config.PORT)]
add_client_test(browser_cmd, cmd)
bcmd = cmd + browser_cmd + ["http://localhost:%i/" % (config.PORT)]
add_client_test(browser_cmd[0], bcmd)
cmd += []
return with_server(get_xpra_start_server_command(), XPRA_SERVER_STOP_COMMANDS, tests, xpra_get_stats)

Expand Down

0 comments on commit c8a4ed3

Please sign in to comment.