def setup(self): """ Compiles disktest. """ os.chdir(self.srcdir) utils.make('clean') utils.make()
def setup(self, tarball='ebizzy-0.3.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('[ -x configure ] && ./configure') utils.make()
def setup(self, tarball='xfstests.tar.bz2'): # # Anticipate failures due to missing devel tools, libraries, headers # and xfs commands # os_dep.command('autoconf') os_dep.command('autoheader') os_dep.command('libtool') os_dep.library('libuuid.so.1') os_dep.header('xfs/xfs.h') os_dep.header('attr/xattr.h') os_dep.header('sys/acl.h') os_dep.command('mkfs.xfs') os_dep.command('xfs_db') os_dep.command('xfs_bmap') os_dep.command('xfsdump') 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 < ../xfstests_103_text.patch') utils.system('patch < ../xfstests_228_text.patch') utils.system('patch < ../xfstests_change_e4defrag_location.patch') utils.make() logging.debug("Available tests in srcdir: %s" % ", ".join(self._get_available_tests()))
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="dbt2-0.39.tar.bz2"): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) 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) 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='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='ext3-tools.tar.gz'): self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.system('patch -p1 < ../fsstress-ltp.patch') utils.make('fsstress')
def setup(self, tarball="xfstests.tar.bz2"): # # Anticipate failures due to missing devel tools, libraries, headers # and xfs commands # os_dep.command("autoconf") os_dep.command("autoheader") os_dep.command("libtool") os_dep.library("libuuid.so.1") os_dep.header("xfs/xfs.h") os_dep.header("attr/xattr.h") os_dep.header("sys/acl.h") os_dep.command("mkfs.xfs") os_dep.command("xfs_db") os_dep.command("xfs_bmap") os_dep.command("xfsdump") 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.make() logging.debug("Available tests in srcdir: %s" % ", ".join(self._get_available_tests()))
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file('http://mirror.x10.com/mirror/mysql/Downloads/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(tarball, topdir): srcdir = os.path.join(topdir, 'src') if not os.path.exists(tarball): utils.get_file( 'http://mirror.x10.com/mirror/mysql/Downloads/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 = 'ext3-tools.tar.gz'): self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.system('patch -p1 < ../makefile.patch') utils.make('bash-shared-mapping usemem')
def setup(self, tarball='blktrace.tar.bz2', **dargs): # v1.0.1, pulled from git, 2009/06/10 # commit 1e09f6e9012826fca69fa07222b7bc53c3e629ee self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.make('"CFLAGS=' + self.gcc_flags + '"')
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(self, tarball = 'ext3-tools.tar.gz'): self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.tarball, self.srcdir) os.chdir(self.srcdir) utils.system('patch -p1 < ../fsstress-ltp.patch') utils.make('fsstress')
def setup(self, tarball = 'lockstat-1.4.11.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.make() self.cmd = self.srcdir + '/lockstat'
def setup(self, local=False, tarball_systemtap="systemtap-0.9.5.tar.gz", tarball_elfutils="elfutils-0.140.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: raise error.TestError("simple systemtap test failed, kernel debuginfo package may be missing: %s" % script)
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='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='posixtestsuite-1.5.2.tar.gz'): self.posix_tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.posix_tarball, self.srcdir) os.chdir(self.srcdir) # Applying a small patch that introduces some linux specific # linking options utils.system('patch -p1 < ../posix-linux.patch') utils.make()
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') utils.extract_tarball_to_dir(tarball, srcdir) os.chdir(srcdir) utils.make() os.environ['MAKEOPTS'] = 'mandir=/usr/share/man' utils.make('install') os.chdir(topdir)
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 = '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(tarball, topdir): srcdir = os.path.join(topdir, 'src') utils.extract_tarball_to_dir(tarball, srcdir) os.chdir(srcdir) utils.system('perl Makefile.PL PREFIX=' + topdir) utils.make() utils.make('install') os.chdir(topdir)
def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') utils.extract_tarball_to_dir(tarball, srcdir) os.chdir(srcdir) utils.system('patch -p1 < ../00_arches.patch') utils.make() utils.make('prefix=%s install' % topdir) os.chdir(topdir)
def setup(self, tarball = 'posixtestsuite-1.5.2.tar.gz'): self.posix_tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(self.posix_tarball, self.srcdir) os.chdir(self.srcdir) # Applying a small patch that introduces some linux specific # linking options utils.system('patch -p1 < ../posix-linux.patch') utils.make()
def setup(topdir): srcdir = os.path.join(topdir, 'src') # Build lansim os.chdir(srcdir) utils.make() utils.system('make install') os.chdir(topdir)
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): """Cleans and makes seccomp_bpf_tests.c. Prepares environment for tests by removing directory we will extract to (if it exists), extracting tarball of tests, and making them. """ os.chdir(self.srcdir) 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 run_once(self): os.chdir(self.srcdir) # make check might fail for 32 bit if the 32 bit compile earlier # had failed. See if it passes for 64 bit in that case. try: utils.make('check') except: utils.make('check OBJDIRS=obj64')
def setup(self): """Copy the crasher source code under |srcdir| and build it.""" src = os.path.join(os.path.dirname(__file__), 'crasher') dest = os.path.join(self.srcdir, 'crasher') shutil.copytree(src, dest) os.chdir(dest) utils.make()
def setup(self, tarball='scrashme-git-snapshot-03-18-2010.tar.bz2'): diff_src = os.path.join(self.bindir, 'testfix.diff') tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) if os.path.exists(diff_src): utils.system('patch -i %s' % diff_src) utils.make()
def setup(self, tarball = 'sparse-2006-04-28.tar.gz'): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.make() utils.system('ln check sparse') self.top_dir = self.job.tmpdir+'/sparse'
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 = 'unixbench-4.1.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 < ../unixbench.patch') utils.system('patch -p1 < ../Makefile.patch') utils.make() utils.system('rm pgms/select')
def setup(self): """Cleans and makes ftrace-clock-monotonic.c. Prepares environment for tests by removing directory we will extract to (if it exists), extracting tarball of tests, and making them. """ os.chdir(self.srcdir) utils.make('clean') 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.system('patch -p1 < ../dbench_startup.patch') utils.system('patch < ../dbench_lpthread.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='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()
def setup(self, tarball='unixbench-4.1.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 < ../unixbench.patch') utils.system('patch -p1 < ../Makefile.patch') utils.make() utils.system('rm pgms/select')
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(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): self.job.require_gcc() scriptdir = os.path.join(self.job.autodir, "virt", "deps", "test_cpu_flags") os.mkdir(self.srcdir) os.chdir(self.srcdir) utils.system('cp -r %s %s' % (os.path.join(scriptdir, "*"), self.srcdir)) utils.make() utils.system('sync')
def setup(self, tarball='qemu-iotests.tar.bz2'): """ Uncompresses the tarball and cleans any leftover output files. @param tarball: Relative path to the testsuite tarball. """ tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.make('clean')
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 = 'flail-0.2.0.tar.gz'): """ Compiles flail with the appropriate parameters. @param tarball: Path or URL for the flail tarball. """ tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) utils.make()