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

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

Issue 3116009: Update autotest tests to use make -j where possible. (Closed) Base URL: ssh://git@chromiumos-git/autotest.git
Patch Set: Convert last two tests to use utils.make(), saving another 20 seconds. Created 10 years, 4 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
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 logging 5 import logging
6 import os 6 import os
7 import re 7 import re
8 8
9 from autotest_lib.client.bin import test 9 from autotest_lib.client.bin import test
10 from autotest_lib.client.common_lib import error, utils 10 from autotest_lib.client.common_lib import error, utils
11 11
12 class platform_MiniJailVfsNamespace(test.test): 12 class platform_MiniJailVfsNamespace(test.test):
13 version = 1 13 version = 1
14 preserve_srcdir = True 14 preserve_srcdir = True
15 15
16 def setup(self): 16 def setup(self):
17 os.chdir(self.srcdir) 17 os.chdir(self.srcdir)
18 utils.system('make clean') 18 utils.make('clean')
19 utils.system('make all') 19 utils.make('all')
20 20
21 21
22 def __run_cmd(self, cmd): 22 def __run_cmd(self, cmd):
23 result = utils.system_output(cmd, retain_output=True, 23 result = utils.system_output(cmd, retain_output=True,
24 ignore_status=True) 24 ignore_status=True)
25 return result 25 return result
26 26
27 27
28 def run_once(self): 28 def run_once(self):
29 # Check that --namespace-vfs works 29 # Check that --namespace-vfs works
(...skipping 19 matching lines...) Expand all
49 49
50 cmd = (os.path.join(self.bindir, 50 cmd = (os.path.join(self.bindir,
51 'platform_MiniJailVfsNamespaceFromOuter.sh') + 51 'platform_MiniJailVfsNamespaceFromOuter.sh') +
52 ' ' + os.path.join(self.bindir, 'platform_MiniJailVfsNamespace')) 52 ' ' + os.path.join(self.bindir, 'platform_MiniJailVfsNamespace'))
53 result = self.__run_cmd(cmd) 53 result = self.__run_cmd(cmd)
54 success_pattern = re.compile(r"SUCCEED: (.+)") 54 success_pattern = re.compile(r"SUCCEED: (.+)")
55 success = success_pattern.findall(result) 55 success = success_pattern.findall(result)
56 if len(success) == 0: 56 if len(success) == 0:
57 raise error.TestFail('Mount from outside the minijail was visible ' + 57 raise error.TestFail('Mount from outside the minijail was visible ' +
58 'inside:\n' + result) 58 'inside:\n' + result)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698