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

Side by Side Diff: client/tests/memory_api/memory_api.py

Issue 6539001: Merge remote branch 'cros/upstream' into master. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « client/tests/lmbench/lmbench.py ('k') | client/tests/rmaptest/rmaptest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import os, subprocess, re, commands, logging 1 import os, subprocess, re, commands, logging
2 from autotest_lib.client.bin import utils, test 2 from autotest_lib.client.bin import utils, test
3 from autotest_lib.client.common_lib import error 3 from autotest_lib.client.common_lib import error
4 4
5 class memory_api(test.test): 5 class memory_api(test.test):
6 version = 1 6 version = 1
7 7
8 def setup(self): 8 def setup(self):
9 utils.system("gcc %s -o %s" % 9 os.mkdir(self.tmpdir)
10 (os.path.join(self.bindir, "memory_api.c"), 10 utils.system("%s %s -o %s" %
11 (utils.get_cc(),
12 os.path.join(self.bindir, "memory_api.c"),
11 os.path.join(self.tmpdir, "memory_api"))) 13 os.path.join(self.tmpdir, "memory_api")))
12 utils.system("gcc %s -o %s" % 14 utils.system("%s %s -o %s" %
13 (os.path.join(self.bindir, "mremaps.c"), 15 (utils.get_cc(),
16 os.path.join(self.bindir, "mremaps.c"),
14 os.path.join(self.tmpdir, "mremaps"))) 17 os.path.join(self.tmpdir, "mremaps")))
15 18
16 19
17 def initialize(self): 20 def initialize(self):
18 self.job.require_gcc() 21 self.job.require_gcc()
19 22
20 23
21 def run_once(self, memsize = "1000000000", args=''): 24 def run_once(self, memsize = "1000000000", args=''):
22 25
23 vma_re = re.compile("([0-9,a-f]+)-([0-9,a-f]+)") 26 vma_re = re.compile("([0-9,a-f]+)-([0-9,a-f]+)")
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 logging.info("%s %s %d %d", hex(mem_start), hex(mem_len), vma_count, 66 logging.info("%s %s %d %d", hex(mem_start), hex(mem_len), vma_count,
64 expected_vma_count) 67 expected_vma_count)
65 if p1.poll() is None: 68 if p1.poll() is None:
66 p1.stdin.write("\n") 69 p1.stdin.write("\n")
67 p1.stdin.flush() 70 p1.stdin.flush()
68 71
69 if p1.poll() != 0: 72 if p1.poll() != 0:
70 raise error.TestFail("Unexpected application abort") 73 raise error.TestFail("Unexpected application abort")
71 74
72 utils.system('%s/mremaps ' % self.tmpdir + '100000000') 75 utils.system('%s/mremaps ' % self.tmpdir + '100000000')
OLDNEW
« no previous file with comments | « client/tests/lmbench/lmbench.py ('k') | client/tests/rmaptest/rmaptest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698