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

Side by Side Diff: client/site_tests/security_RestartJob/security_RestartJob.py

Issue 5519008: Create a cros directory under client, and start moving things into it. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « client/site_tests/login_SecondFactor/login_SecondFactor.py ('k') | no next file » | 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) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 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 dbus 5 import dbus
6 import logging 6 import logging
7 import os.path 7 import os.path
8 import subprocess 8 import subprocess
9 9
10 from autotest_lib.client.bin import chromeos_constants
11 from autotest_lib.client.bin import site_login, test, utils 10 from autotest_lib.client.bin import site_login, test, utils
12 from autotest_lib.client.common_lib import error 11 from autotest_lib.client.common_lib import error
13 12 from autotest_lib.client.cros import constants as chromeos_constants
14 13
15 class security_RestartJob(test.test): 14 class security_RestartJob(test.test):
16 version = 1 15 version = 1
17 _FLAGFILE = '/tmp/security_RestartJob_regression' 16 _FLAGFILE = '/tmp/security_RestartJob_regression'
18 17
19 def _ps(self, proc=chromeos_constants.BROWSER): 18 def _ps(self, proc=chromeos_constants.BROWSER):
20 pscmd = 'ps -C %s -o pid --no-header | head -1' % proc 19 pscmd = 'ps -C %s -o pid --no-header | head -1' % proc
21 return utils.system_output(pscmd) 20 return utils.system_output(pscmd)
22 21
23 def run_once(self): 22 def run_once(self):
(...skipping 21 matching lines...) Expand all
45 sessionmanager.RestartJob(pid, cmd) 44 sessionmanager.RestartJob(pid, cmd)
46 45
47 testfail = os.path.exists(self._FLAGFILE) 46 testfail = os.path.exists(self._FLAGFILE)
48 47
49 # Clean up, before we throw our TestFail, since this test 48 # Clean up, before we throw our TestFail, since this test
50 # killed chrome and mangled its argv... 49 # killed chrome and mangled its argv...
51 site_login.nuke_login_manager() 50 site_login.nuke_login_manager()
52 51
53 if testfail: 52 if testfail:
54 raise error.TestFail('RestartJob regression, see cros bug 7018') 53 raise error.TestFail('RestartJob regression, see cros bug 7018')
OLDNEW
« no previous file with comments | « client/site_tests/login_SecondFactor/login_SecondFactor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698