Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: server/site_tests/platform_BootPerfServer/platform_BootPerfServer.py

Issue 2830016: Add boot time tests to nightly suite, and run multiple iterations (Closed) Base URL: ssh://gitrw.chromium.org/autotest.git
Patch Set: rename run_client_tests to something hopefully more appropriate Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | server/site_tests/suite_Nightly/control » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import os 6 import os
7 import shutil 7 import shutil
8 from autotest_lib.server import test, autotest 8 from autotest_lib.server import test, autotest
9 9
10 10
11 class platform_BootPerfServer(test.test): 11 class platform_BootPerfServer(test.test):
12 version = 1 12 version = 1
13 13
14 14
15 def run_once(self, host=None): 15 def run_once(self, host=None):
16 self.client = host 16 self.client = host
17 self.client_test = 'platform_BootPerf' 17 self.client_test = 'platform_BootPerf'
18 18
19 # Reboot the client 19 # Reboot the client
20 logging.info('BootPerfServer: reboot %s' % self.client.hostname) 20 logging.info('BootPerfServer: reboot %s' % self.client.hostname)
21 self.client.reboot() 21 self.client.reboot()
22 22
23 # Collect the performance metrics by running a client side test 23 # Collect the performance metrics by running a client side test
24 client_at = autotest.Autotest(self.client) 24 client_at = autotest.Autotest(self.client)
25 client_at.run_test(self.client_test, last_boot_was_reboot=True) 25 client_at.run_test(self.client_test, last_boot_was_reboot=True)
26 26
27
28 def postprocess(self):
29 logging.info('BootPerfServer: postprocess %s' % self.client.hostname)
30
31 # Promote the client test keyval as our own 27 # Promote the client test keyval as our own
32 src = os.path.join(self.outputdir, self.client_test, "results/keyval") 28 src = os.path.join(self.outputdir, self.client_test, "results/keyval")
33 dst = os.path.join(self.resultsdir, "keyval") 29 dst = os.path.join(self.resultsdir, "keyval")
34 if os.path.exists(src): 30 if os.path.exists(src):
35 shutil.copy(src, dst) 31 client_results = open(src, "r")
32 server_results = open(dst, "a")
33 shutil.copyfileobj(client_results, server_results)
34 server_results.close()
35 client_results.close()
36 else: 36 else:
37 logging.warn('Unable to locate %s' % src) 37 logging.warn('Unable to locate %s' % src)
OLDNEW
« no previous file with comments | « no previous file | server/site_tests/suite_Nightly/control » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698