def setup(self, tarball = 'stress-1.0.4.tar.gz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make()
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file( 'http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.45.tar.gz', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) utils.configure('--prefix=%s/mysql --enable-thread-safe-client' % topdir) utils.make('-j %d' % utils.count_cpus()) utils.make('install') # # MySQL doesn't create this directory on it's own. # This is where database logs and files are created. # try: os.mkdir(topdir + '/mysql/var') except Exception: pass # # Initialize the database. # utils.system('%s/mysql/bin/mysql_install_db' % topdir) os.chdir(topdir)
def setup(self, tarball='ltt-control-0.51-12082008.tar.gz', **dargs): self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make()
def setup(self, tarball='oprofile-0.9.4.tar.bz2', local=None, *args, **dargs): if local is True: return try: self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) patch = os.path.join(self.bindir, "oprofile-69455.patch") utils.system('patch -p1 < %s' % patch) utils.configure('--with-kernel-support --prefix=' + self.srcdir) utils.make('-j %d' % utils.count_cpus()) utils.make('install') except Exception: # Build from source failed. # But maybe can still use the local copy local_opcontrol = os.path.exists('/usr/bin/opcontrol') local_opreport = os.path.exists('/usr/bin/opreport') if local is False or not local_opcontrol or not local_opreport: raise error.AutotestError('No oprofile available') else: # if we managed to build, try again to pick binaries self._pick_binaries(True)
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file('http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.45.tar.gz', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) utils.configure('--prefix=%s/mysql --enable-thread-safe-client' % topdir) utils.make('-j %d' % utils.count_cpus()) utils.make('install') # # MySQL doesn't create this directory on it's own. # This is where database logs and files are created. # try: os.mkdir(topdir + '/mysql/var') except Exception: pass # # Initialize the database. # utils.system('%s/mysql/bin/mysql_install_db' % topdir) os.chdir(topdir)
def setup(self, tarball='oprofile-0.9.4.tar.bz2', local=None, *args, **dargs): if local == True: return try: self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) patch = os.path.join(self.bindir, "oprofile-69455.patch") utils.system('patch -p1 < %s' % patch) utils.configure('--with-kernel-support --prefix=' + \ self.srcdir) utils.make('-j %d' % utils.count_cpus()) utils.make('install') except Exception: # Build from source failed. # But maybe can still use the local copy local_opcontrol = os.path.exists('/usr/bin/opcontrol') local_opreport = os.path.exists('/usr/bin/opreport') if local == False or not local_opcontrol or not local_opreport: raise error.AutotestError('No oprofile available') else: # if we managed to build, try again to pick binaries self._pick_binaries(True)
def setup(self, tarball = 'dbt2-0.39.tar.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) profile_src = os.path.join(self.bindir, 'pgpool.conf') profile_dst = os.path.join(os.path.dirname(self.srcdir), 'pgpool.conf') shutil.copyfile(profile_src, profile_dst) self.job.setup_dep(['pgsql', 'pgpool', 'mysql']) # # Extract one copy of the kit for MySQL. # utils.system('cp -pR ' + self.srcdir + ' ' + self.srcdir + '.mysql') os.chdir(self.srcdir + '.mysql') utils.configure('--with-mysql=%s/deps/mysql/mysql' % self.autodir) utils.make() # # Extract one copy of the kit for PostgreSQL. # utils.system('cp -pR ' + self.srcdir + ' ' + self.srcdir + '.pgsql') os.chdir(self.srcdir + '.pgsql') utils.configure('--with-postgresql=%s/deps/pgsql/pgsql' % self.autodir) utils.make() # Create symlinks to autotest's results directory from dbt-2's # preferred results directory to self.resultsdir utils.system('ln -s %s %s' % (self.resultsdir, self.srcdir + '.mysql/scripts/output')) utils.system('ln -s %s %s' % (self.resultsdir, self.srcdir + '.pgsql/scripts/output'))
def setup(self, local=False, tarball_systemtap='systemtap-1.8.tar.gz', tarball_elfutils='elfutils-0.155.tar.bz2'): depdir = os.path.join(self.autodir, 'deps/systemtap') tarball_systemtap = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir) tarball_elfutils = utils.unmap_url(depdir, tarball_elfutils, self.tmpdir) srcdir = os.path.join(depdir, 'src') utils.extract_tarball_to_dir(tarball_systemtap, srcdir) elfdir = os.path.join(srcdir, 'elfutils') utils.extract_tarball_to_dir(tarball_elfutils, elfdir) self.job.setup_dep(['dejagnu']) if local == False: self.job.setup_dep(['systemtap']) # Try grabbing the systemtap tarball out of the deps directory depdir = os.path.join(self.autodir, 'deps/systemtap') if os.path.exists(os.path.join(depdir, tarball_systemtap)): tarball = utils.unmap_url(depdir, tarball_systemtap, self.tmpdir) else: tarball = utils.unmap_url(self.bindir, tarball_systemtap, self.tmpdir) utils.extract_tarball_to_dir(tarball_systemtap, self.srcdir) testsuite = os.path.join(self.srcdir, 'testsuite') os.chdir(testsuite) utils.configure() utils.make() # Run a simple systemtap script to make sure systemtap and the # kernel debuginfo packages are correctly installed script = "PATH=%s/bin:$PATH stap -c /bin/true -e 'probe syscall.read { exit() }'" % self.systemtap_dir try: utils.system(script) except Exception: raise error.TestError('simple systemtap test failed, kernel debuginfo package may be missing: %s' % script)
def setup(self, tarball='dbt2-0.39.tar.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) profile_src = os.path.join(self.bindir, 'pgpool.conf') profile_dst = os.path.join(os.path.dirname(self.srcdir), 'pgpool.conf') shutil.copyfile(profile_src, profile_dst) self.job.setup_dep(['pgsql', 'pgpool', 'mysql']) # # Extract one copy of the kit for MySQL. # utils.system('cp -pR ' + self.srcdir + ' ' + self.srcdir + '.mysql') os.chdir(self.srcdir + '.mysql') utils.configure('--with-mysql=%s/deps/mysql/mysql' % self.autodir) utils.make() # # Extract one copy of the kit for PostgreSQL. # utils.system('cp -pR ' + self.srcdir + ' ' + self.srcdir + '.pgsql') os.chdir(self.srcdir + '.pgsql') utils.configure('--with-postgresql=%s/deps/pgsql/pgsql' % self.autodir) utils.make() # Create symlinks to autotest's results directory from dbt-2's # preferred results directory to self.resultsdir utils.system('ln -s %s %s' % (self.resultsdir, self.srcdir + '.mysql/scripts/output')) utils.system('ln -s %s %s' % (self.resultsdir, self.srcdir + '.pgsql/scripts/output'))
def setup(self, tarball="dbt2-0.39.tar.bz2"): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) profile_src = os.path.join(self.bindir, "pgpool.conf") profile_dst = os.path.join(os.path.dirname(self.srcdir), "pgpool.conf") shutil.copyfile(profile_src, profile_dst) self.job.setup_dep(["pgsql", "pgpool", "mysql"]) # # Extract one copy of the kit for MySQL. # utils.system("cp -pR " + self.srcdir + " " + self.srcdir + ".mysql") os.chdir(self.srcdir + ".mysql") utils.configure("--with-mysql=%s/deps/mysql/mysql" % self.autodir) utils.make() # # Extract one copy of the kit for PostgreSQL. # utils.system("cp -pR " + self.srcdir + " " + self.srcdir + ".pgsql") os.chdir(self.srcdir + ".pgsql") utils.configure("--with-postgresql=%s/deps/pgsql/pgsql" % self.autodir) utils.make() # Create symlinks to autotest's results directory from dbt-2's # preferred results directory to self.resultsdir utils.system("ln -s %s %s" % (self.resultsdir, self.srcdir + ".mysql/scripts/output")) utils.system("ln -s %s %s" % (self.resultsdir, self.srcdir + ".pgsql/scripts/output"))
def setup(self, tarball='spew-1.0.5.tgz'): self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make()
def setup(self, tarball='dbench-3.04.tar.gz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make()
def setup(self, tarball='xm-test.tar.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.system('./autogen') utils.configure() utils.make('existing')
def setup(self, tarball='util-linux-2.12r.tar.bz2'): self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() os.chdir('sys-utils') utils.make('readprofile')
def setup(self, tarball='bonnie++-1.96.tgz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) os_dep.command('g++') utils.configure() utils.make()
def setup(self, tarball="util-linux-2.12r.tar.bz2"): self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() os.chdir("sys-utils") utils.make("readprofile")
def setup(self, tarball='dbench-3.04.tar.gz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.system('patch -p1 < ../dbench_startup.patch') utils.configure() utils.make()
def setup(self, tarball = 'bonnie++-1.03a.tgz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) os_dep.command('g++') utils.system('patch -p1 < ../bonnie++-1.03a-gcc43.patch') utils.configure() utils.make()
def setup(self, tarball='bonnie++-1.03e.tar.bz2'): """ Compiles bonnie. """ tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make()
def setup(self, tarball='bonnie++-1.03a.tgz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) os_dep.command('g++') utils.system('patch -p1 < ../bonnie++-1.03a-gcc43.patch') utils.configure() utils.make()
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) utils.configure('--prefix=%s/dejagnu' % topdir) utils.make() utils.make('install') os.chdir(topdir)
def setup(self, tarball='netperf-2.6.0.tar.bz2'): self.job.require_gcc() tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make() utils.system('sync')
def setup(self, tarball='iperf-2.0.4.tar.gz'): self.job.require_gcc() tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make() utils.system('sync')
def setup(topdir): srcdir = os.path.join(topdir, 'src') os.chdir(srcdir) utils.configure('--with-elfutils=elfutils --prefix=%s/systemtap' % topdir) utils.make('-j %d' % utils.count_cpus()) utils.make('install') os.chdir(topdir)
def setup(self, tarball='kvm-unit-tests.tar.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.configure() utils.make() # patch run_tests.sh to build our tests list utils.system('patch -p1 < %s/run_tests_show.patch' % self.bindir) utils.system('./run_tests.sh -v > tests.txt')
def setup(self, tarball="netperf-2.4.5.tar.bz2"): self.job.require_gcc() tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.system("patch -p0 < ../wait_before_data.patch") utils.configure() utils.make() utils.system("sync")
def setup(self, tarball='netperf-2.4.5.tar.bz2'): self.job.require_gcc() tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.system('patch -p0 < %s/wait_before_data.patch' % self.bindir) utils.configure() utils.make() utils.system('sync')
def setup(self, tarball='dbench-4.0.0.tar.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) #utils.system('patch -p1 < %s' % # os.path.join(self.bindir, 'dbench_startup.patch')) utils.system("./autogen.sh") utils.configure() utils.make()
def setup(self, tarball = 'ltp-full-20120104.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) ltpbin_dir = os.path.join(self.srcdir, 'bin') os.mkdir(ltpbin_dir) utils.system('cp ../scan.c pan/') # saves having lex installed utils.configure('--prefix=%s' % ltpbin_dir) utils.make('-j %d all' % utils.count_cpus()) utils.system('yes n | make SKIP_IDCHECK=1 install')
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file('ftp://ftp-archives.postgresql.org/pub/source/v8.3.1/postgresql-8.3.1.tar.bz2', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) utils.configure('--without-readline --without-zlib --enable-debug --prefix=%s/pgsql' % topdir) utils.make('-j %d' % utils.count_cpus()) utils.make('install') os.chdir(topdir)
def setup(self, tarball='ltp-full-20120104.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) ltpbin_dir = os.path.join(self.srcdir, 'bin') os.mkdir(ltpbin_dir) utils.system('cp ../scan.c pan/') # saves having lex installed utils.configure('--prefix=%s' % ltpbin_dir) utils.make('-j %d all' % utils.count_cpus()) utils.system('yes n | make SKIP_IDCHECK=1 install')
def setup(self, tarball='ubuntu_ecryptfs.tar.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) print(utils.system_output('head %s/bzr.log' % self.srcdir, retain_output=True)) os.chdir(self.srcdir) utils.system('patch -p1 < %s/run_one.patch' % self.bindir) utils.system('chmod +x tests/run_one.sh') utils.system('autoreconf -ivf') utils.system('intltoolize -c -f') utils.configure('--enable-tests --disable-pywrap') utils.make()
def setup(self, tarball="ltp-full-20140115.tar.bz2"): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) ltpbin_dir = os.path.join(self.srcdir, "bin") os.mkdir(ltpbin_dir) # saves having lex installed shutil.copy(os.path.join(self.bindir, "scan.c"), os.path.join(self.srcdir, "pan")) utils.configure("--prefix=%s" % ltpbin_dir) utils.make("-j %d all" % utils.count_cpus()) utils.system("yes n | make SKIP_IDCHECK=1 install")
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file( 'http://www.packetfactory.net/libnet/dist/libnet.tar.gz', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) utils.configure('--prefix=%s/libnet' % topdir) utils.make() utils.make('install') os.chdir(topdir)
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file('http://www.packetfactory.net/libnet/dist/libnet.tar.gz', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) utils.configure('--prefix=%s/libnet' % topdir) utils.make() utils.make('install') os.chdir(topdir)
def setup(self, tarball='ffsb-6.0-rc2.tar.bz2'): """ Uncompress the FFSB tarball and compiles it. @param tarball: FFSB tarball. Could be either a path relative to self.srcdir or a URL. """ tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) os_dep.command('gcc') utils.configure() utils.make()
def setup(self, tarball='ltp-full-20160510.tar.bz2'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) ltpbin_dir = os.path.join(self.srcdir, 'bin') os.mkdir(ltpbin_dir) # saves having lex installed shutil.copy(os.path.join(self.bindir, 'scan.c'), os.path.join(self.srcdir, 'pan')) utils.system('make autotools') utils.configure('--prefix=%s' % ltpbin_dir) utils.make('-j %d all' % utils.count_cpus()) utils.system('yes n | make SKIP_IDCHECK=1 install')
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file( 'ftp://ftp-archives.postgresql.org/pub/source/v8.3.1/postgresql-8.3.1.tar.bz2', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) utils.configure( '--without-readline --without-zlib --enable-debug --prefix=%s/pgsql' % topdir) utils.make('-j %d' % utils.count_cpus()) utils.make('install') os.chdir(topdir)
def setup(self, tarball='ffsb-6.0-rc2.tar.bz2'): """ Uncompress the FFSB tarball and compiles it. @param tarball: FFSB tarball. Could be either a path relative to self.srcdir or a URL. """ profile_src = os.path.join(self.bindir, 'profile.cfg.sample') profile_dst = os.path.join(os.path.dirname(self.srcdir), 'profile.cfg') shutil.copyfile(profile_src, profile_dst) tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) os_dep.command('gcc') utils.configure() utils.make()
def setup(tarball, topdir): # FIXME - Waiting to be able to specify dependency. # self.job.setup_dep(['pgsql']) srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file('http://pgfoundry.org/frs/download.php/1083/pgpool-II-1.0.1.tar.gz', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) # FIXEME - Waiting to be able to use self.autodir instead of # os.environ['AUTODIR'] utils.configure('--prefix=%s/pgpool --with-pgsql=%s/deps/pgsql/pgsql' % (topdir, os.environ['AUTODIR'])) utils.make('-j %d' % utils.count_cpus()) utils.make('install') os.chdir(topdir)
def setup(tarball, topdir): # FIXME - Waiting to be able to specify dependency. # self.job.setup_dep(['pgsql']) srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file( 'http://pgfoundry.org/frs/download.php/1083/pgpool-II-1.0.1.tar.gz', tarball) utils.extract_tarball_to_dir(tarball, 'src') os.chdir(srcdir) # FIXEME - Waiting to be able to use self.autodir instead of # os.environ['AUTODIR'] utils.configure('--prefix=%s/pgpool --with-pgsql=%s/deps/pgsql/pgsql' % (topdir, os.environ['AUTODIR'])) utils.make('-j %d' % utils.count_cpus()) utils.make('install') os.chdir(topdir)
def run_once(self, test_type='mysql', num_threads=[4], table_size=100, db_pw='', runtimes=1, read_only=0, block_size='512', total_size='1G', args=''): if (test_type == 'mysql'): utils.system('yum -y install mysql mysql-server mysql-devel') os.chdir(self.srcdir) # configure wants to get config, so install it utils.configure('--with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64/mysql') utils.system('./autogen.sh') utils.make('LIBTOOL=/usr/bin/libtool') utils.make('LIBTOOL=/usr/bin/libtool install') self.execute_mysql(num_threads, db_pw, table_size, runtimes, read_only, args) elif (test_type == 'memory'): os.chdir(self.srcdir) utils.configure('--without-mysql') utils.system('./autogen.sh') utils.make('LIBTOOL=/usr/bin/libtool') utils.make('LIBTOOL=/usr/bin/libtool install') self.execute_mem(num_threads, runtimes, block_size, total_size, args)
def setup(self): utils.system_output('rm /etc/*/S99autotest || true', retain_output=True) utils.system_output('useradd zfs-tests || true', retain_output=True) utils.system_output('echo \"zfs-tests ALL=(ALL)NOPASSWD: ALL\" >> /etc/sudoers', retain_output=True) print "Extracting zfs-test tarball.." tarball = utils.unmap_url(self.bindir, 'zfs-tests.tar.bz2', self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) utils.system_output('rsync -arv %s/tests %s/' % (self.bindir, self.srcdir)) os.chdir(self.srcdir) print "Patching zfs-test tarball.." utils.system('patch -p1 < %s/zfs-tweaks.patch' % self.bindir) print "Building zfs-test tarball.." utils.system('./autogen.sh') utils.configure('') utils.system('SRCDIR=%s make' % self.srcdir) utils.system('modprobe zfs')