• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import os
2from autotest_lib.client.bin import test, utils
3
4
5class isic(test.test):
6    version = 2
7
8    # http://www.packetfactory.net/Projects/ISIC/isic-0.06.tgz
9    # + http://www.stardust.webpages.pl/files/crap/isic-gcc41-fix.patch
10
11    def initialize(self):
12        self.job.require_gcc()
13        self.job.setup_dep(['libnet'])
14
15
16    def setup(self, tarball = 'isic-0.06.tar.bz2'):
17        tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
18        utils.extract_tarball_to_dir(tarball, self.srcdir)
19        os.chdir(self.srcdir)
20
21        utils.system('patch -p1 < ../build-fixes.patch')
22        utils.system('PREFIX=%s /deps/libnet/libnet/ ./configure' %self.autodir)
23        utils.system('make')
24
25    def execute(self, args = '-s rand -d 127.0.0.1 -p 10000000'):
26        utils.system(self.srcdir + '/isic ' + args)
27