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

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

Issue 1234001: autotest: Make netperf2 cross compile (Closed)
Patch Set: Move configure() to utils. Created 10 years, 9 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 | « client/deps/sysstat/sysstat.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 import os, time, re, logging 1 import os, time, re, logging
2 from autotest_lib.client.bin import test, utils 2 from autotest_lib.client.bin import test, utils
3 from autotest_lib.client.bin.net import net_utils 3 from autotest_lib.client.bin.net import net_utils
4 from autotest_lib.client.common_lib import error 4 from autotest_lib.client.common_lib import error
5 5
6 MPSTAT_IX = 0 6 MPSTAT_IX = 0
7 NETPERF_IX = 1 7 NETPERF_IX = 1
8 8
9 class netperf2(test.test): 9 class netperf2(test.test):
10 version = 4 10 version = 4
11 11
12 # ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.gz 12 # ftp://ftp.netperf.org/netperf/netperf-2.4.4.tar.gz
13 def setup(self, tarball = 'netperf-2.4.4.tar.gz'): 13 def setup(self, tarball = 'netperf-2.4.4.tar.gz'):
14 self.job.require_gcc() 14 self.job.require_gcc()
15 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) 15 tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
16 utils.extract_tarball_to_dir(tarball, self.srcdir) 16 utils.extract_tarball_to_dir(tarball, self.srcdir)
17 os.chdir(self.srcdir) 17 os.chdir(self.srcdir)
18 18
19 utils.system('patch -p0 < ../wait_before_data.patch') 19 utils.system('patch -p0 < ../wait_before_data.patch')
20 # Fixing up a compile issue under newer systems that have 20 # Fixing up a compile issue under newer systems that have
21 # CPU_SET_S defined on /usr/include/sched.h, backported from 21 # CPU_SET_S defined on /usr/include/sched.h, backported from
22 # upstream svn trunk 22 # upstream svn trunk
23 utils.system('patch -p0 < ../fix_netperf_build.patch') 23 utils.system('patch -p0 < ../fix_netperf_build.patch')
24 utils.system('./configure') 24 utils.configure()
25 utils.system('make') 25 utils.system('make')
26 utils.system('sync') 26 utils.system('sync')
27 27
28 self.job.setup_dep(['sysstat']) 28 self.job.setup_dep(['sysstat'])
29 29
30 30
31 def initialize(self): 31 def initialize(self):
32 self.server_prog = '%s&' % os.path.join(self.srcdir, 'src/netserver') 32 self.server_prog = '%s&' % os.path.join(self.srcdir, 'src/netserver')
33 self.client_prog = '%s' % os.path.join(self.srcdir, 'src/netperf') 33 self.client_prog = '%s' % os.path.join(self.srcdir, 'src/netperf')
34 self.valid_tests = ['TCP_STREAM', 'TCP_MAERTS', 'TCP_RR', 'TCP_CRR', 34 self.valid_tests = ['TCP_STREAM', 'TCP_MAERTS', 'TCP_RR', 'TCP_CRR',
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 end_time = curr_time + timeout 345 end_time = curr_time + timeout
346 while curr_time < end_time: 346 while curr_time < end_time:
347 if not os.system('ping -c 1 ' + ip): 347 if not os.system('ping -c 1 ' + ip):
348 # Ping succeeded 348 # Ping succeeded
349 return 349 return
350 # Ping failed. Lets sleep a bit and try again. 350 # Ping failed. Lets sleep a bit and try again.
351 time.sleep(5) 351 time.sleep(5)
352 curr_time = time.time() 352 curr_time = time.time()
353 353
354 return 354 return
OLDNEW
« no previous file with comments | « client/deps/sysstat/sysstat.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698