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 < %s/makefile.patch' % self.bindir)
        utils.make('bash-shared-mapping usemem')
Пример #2
0
    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()
Пример #3
0
    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'
Пример #4
0
    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()
Пример #5
0
def setup(srcdir, tarball='fio-2.0.9-38-g98dc.tar.gz'):
    topdir = os.getcwd()
    utils.extract_tarball_to_dir(tarball, srcdir)
    os.chdir(srcdir)
    utils.make('-j4')
    utils.make('install')
    os.chdir(topdir)
Пример #6
0
    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'))
Пример #7
0
    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"))
Пример #8
0
    def setup(self, tarball='xfstests.tar.bz2'):
        '''
        Sets up the environment necessary for running xfstests
        '''
        #
        # 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()))
Пример #9
0
def setup(tarball, topdir):
    srcdir = os.path.join(topdir, "src")
    utils.extract_tarball_to_dir(tarball, srcdir)
    os.chdir(srcdir)
    utils.make()
    utils.make("prefix=%s install" % topdir)
    os.chdir(topdir)
Пример #10
0
    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()
Пример #11
0
 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 + '"')
Пример #12
0
    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)
Пример #13
0
 def setup(self, tarball='NPB3.3.tar.gz'):
     tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
     utils.extract_tarball_to_dir(tarball, self.srcdir)
     os.chdir(self.srcdir)
     # Prepare the makefile and benchmarks to generate.
     utils.system('patch -p1 < %s/enable-all-tests.patch' % self.bindir)
     utils.system('cd NPB3.3-OMP && make suite')
Пример #14
0
 def setup(self, tarball='tiobench-0.3.3.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/makefile.patch' % self.bindir)
     utils.system('patch -p1 < %s/tiotest.patch' % self.bindir)
     utils.system('make')
Пример #15
0
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)
Пример #16
0
    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()
Пример #17
0
    def setup(self, tarball='sparse-2013-06-26.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()

        self.top_dir = self.job.tmpdir + '/sparse'
Пример #18
0
    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()
Пример #19
0
    def setup(self, tarball='connectathon.tar.bz2'):
        connectathon_tarball = utils.unmap_url(self.bindir, tarball,
                                               self.tmpdir)
        utils.extract_tarball_to_dir(connectathon_tarball, self.srcdir)

        os.chdir(self.srcdir)
        utils.system('make clean')
        utils.system('make')
Пример #20
0
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)
Пример #21
0
    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")
Пример #22
0
    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')
Пример #23
0
    def setup(self, tarball = 'isic-0.06.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 < ../build-fixes.patch')
        utils.system('PREFIX=%s /deps/libnet/libnet/ ./configure' %self.autodir)
        utils.system('make')
Пример #24
0
 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()
Пример #25
0
    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()
Пример #26
0
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)
Пример #27
0
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)
Пример #28
0
    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 < %s/fsstress-ltp.patch' % self.bindir)
        utils.system('patch -p1 < %s/makefile.patch' % self.bindir)
        utils.make('fsstress')
Пример #29
0
	def setup(self, tarball='pingpong.tar.gz', table=16):
            self.job.require_gcc()
            tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
            utils.extract_tarball_to_dir(tarball, self.srcdir)
	    if (table == 16): 
	    	os.chdir(self.srcdir)
            	utils.system('patch -p0 < %s' %
                     os.path.join(self.bindir, 'Runtest.patch'))
Пример #30
0
 def setup(self, tarball='pingpong-0.1.tar.bz2'):
     """
     Compiles pingpong.
     """
     tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
     utils.extract_tarball_to_dir(tarball, self.srcdir)
     os.chdir(self.srcdir)
     utils.make()
Пример #31
0
    def setup(self, source_type, source_location, disk_addr, patches,
              **kwargs):
        if source_type == "tar":
            tarball = utils.unmap_url(self.bindir, source_location, self.tmpdir)
            self.repodir = os.path.join(self.tmpdir, "scsi_testsuite")
            utils.extract_tarball_to_dir(tarball, self.repodir)
        elif source_type == "git":
            self.repodir = git.get_repo(source_location)
        else:
            raise UnknownSourceType(source_type)

        sm = software_manager.SoftwareManager()
        for utility in ['/usr/bin/sg_raw', '/usr/bin/lsscsi']:
            if not os.access(utility, os.X_OK):
                logging.debug("%s missing - trying to install", utility)
                pkg = sm.provides(utility)
                if pkg is None:
                    raise SCSIUtilNotAvailable(utility)
                else:
                    sm.install(pkg)

        self.devname = ""
        if disk_addr[0] == "scsi":
            addr = (disk_addr[1]["host"],
                    disk_addr[1]["channel"],
                    disk_addr[1]["target"],
                    disk_addr[1]["lun"])

            self.devname = utils.system_output(
                "lsscsi %d %d %d %d | sed -n 's,.*/dev,/dev,p' " %
                addr)

        elif disk_addr[0] == "serial":
            disklist = os.listdir("/dev/disk/by-id/")
            for diskfile in disklist:
                if re.match("scsi-.*%s$" % disk_addr[1], diskfile) is not None:
                    self.devname = os.path.join("/dev/disk/by-id", diskfile)
                    break
        elif disk_addr[0] == "file":
            if os.access(disk_addr[1], os.F_OK):
                self.devname = disk_addr[1]

        if self.devname == "":
            output = utils.system_output("lsscsi")
            logging.debug(output)
            raise error.TestFail("Disk not found, cannot execute tests")

        try:
            cf = open(self.scsi_testsuite_config, "w")
            cf.write("export TEST_DEV=%s" % self.devname)
            cf.close()
        except IOError:
            logging.warning("Can't write configuration file. Using defaults")

        for patch in patches:
            utils.system("cd %s; patch -p1 < %s/%s" % (self.repodir,
                                                       self.bindir, patch))
Пример #32
0
    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')
Пример #33
0
    def setup(self, tarball='isic-0.06.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/build-fixes.patch' % self.bindir)
        utils.system('PREFIX=%s/deps/libnet/libnet/ ./configure' %
                     self.autodir)
        utils.system('make')
Пример #34
0
    def setup(self, tarball='libhugetlbfs-2.14.tar.gz'):
        # get the sources
        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/elflink.patch' % self.bindir)

        # build for the underlying arch only (i.e. only 64 bit on 64 bit etc)
        utils.make('BUILDTYPE=NATIVEONLY')
Пример #35
0
    def setup(self, tarball='stream-5.9-1.tar.bz2'):
        """
        Compiles stream.
        """
        tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
        utils.extract_tarball_to_dir(tarball, self.srcdir)
        os.chdir(self.srcdir)

        utils.make()
Пример #36
0
    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 < %s/bonnie++-1.03a-gcc43.patch' % self.bindir)
        utils.configure()
        utils.make()
Пример #37
0
    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()
    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')
Пример #39
0
    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')
Пример #40
0
    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()
Пример #41
0
    def setup(self, instrument_lib_tarball = 'eventstat.tar.bz2'):
        instrument_lib_tarball = utils.unmap_url(self.bindir, instrument_lib_tarball, self.tmpdir)
        utils.extract_tarball_to_dir(instrument_lib_tarball, self.srcdir)

	#
	# make the tools
	#
	tool = os.path.join(self.srcdir, 'eventstat')
	os.chdir(self.srcdir)
	utils.make()
Пример #42
0
    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')
Пример #43
0
    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')
Пример #44
0
    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()
Пример #45
0
    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 < %s' %
                     os.path.join(self.bindir, 'dbench_startup.patch'))
        utils.system('patch < %s' %
                     os.path.join(self.bindir, 'dbench_lpthread.patch'))

        utils.configure()
        utils.make()
Пример #46
0
    def setup(self):
        series = platform.dist()[2]

        print "Extracting fstest tarball.."
        tarball = utils.unmap_url(self.bindir, 'fstest.tar.bz2', self.tmpdir)
        utils.extract_tarball_to_dir(tarball, self.srcdir)

        os.chdir(self.srcdir)
        print "Building fstest.."
        utils.system('make')
        print "Loading zfs driver.."
        utils.system('modprobe zfs')
Пример #47
0
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)
Пример #48
0
    def setup(self, tarball = 'libhugetlbfs-2.0.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 < %s/elflink.patch' % self.bindir)
        # make might fail if there are no proper headers for the 32 bit
        # version, in that case try only for the 64 bit version
        try:
            utils.make()
        except Exception:
            utils.make('OBJDIRS=obj64')
Пример #49
0
    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()
Пример #50
0
    def setup(self, tarball='unixbench-5.1.3.tgz'):
        """
        Compiles unixbench.

        @tarball: Path or URL to a unixbench tarball
        @see: http://byte-unixbench.googlecode.com/files/unixbench-5.1.3.tgz
        """
        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 < ../Makefile.patch')
        utils.make()
Пример #51
0
    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')
Пример #52
0
    def setup(self, tarball='lmbench3.tar.bz2', fsdir=None, file=None):
        """
        Uncompresses the original lmbench tarball, applies a patch to fix
        some build issues, configures lmbench and then modifies the config
        files to use appropriate directory and file locations.

        @param tarball: Lmbench tarball.
        @param fsdir: Directory where file system tests will run
                (defaults to standard test temp dir).
        @param file: Path to the file lmbench will use for status output
                (defaults to a random named file inside standard test temp dir).
        @see: http://www.bitmover.com/lm/lmbench/lmbench3.tar.gz
                (original tarball, shipped as is in autotest).
        """
        tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
        utils.extract_tarball_to_dir(tarball, self.srcdir)
        os.chdir(self.srcdir)
        p1 = 'patch -p1 < %s/0001-Fix-build-issues-with-lmbench.patch' % self.bindir
        p2 = 'patch -p1 < %s/0002-Changing-shebangs-on-lmbench-scripts.patch' % self.bindir
        p3 = 'patch -p1 < %s/0003-makefile.patch' % self.bindir
        utils.system(p1)
        utils.system(p2)
        utils.system(p3)

        # build lmbench
        utils.make()

        # configure lmbench
        utils.system('yes "" | make config')

        # find the lmbench config file
        config_files = utils.system_output('ls -1 bin/*/CONFIG*').splitlines()
        if len(config_files) != 1:
            raise error.TestError(
                'Failed to find a single lmbench config file,'
                ' found: %s' % config_files)
        config_file = config_files[0]

        if not fsdir:
            fsdir = self.tmpdir
        if not file:
            file = os.path.join(self.tmpdir, 'XXX')

        # patch the resulted config to use the proper temporary directory and
        # file locations
        tmp_config_file = config_file + '.tmp'
        utils.system("sed 's!^FSDIR=.*$!FSDIR=%s!' '%s' > '%s'" %
                     (fsdir, config_file, tmp_config_file))
        utils.system("sed 's!^FILE=.*$!FILE=%s!' '%s' > '%s'" %
                     (file, tmp_config_file, config_file))
Пример #53
0
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)
Пример #54
0
    def setup(self, tarball = 'sysbench-0.4.8.tar.bz2'):
        tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
        utils.extract_tarball_to_dir(tarball, self.srcdir)
        self.job.setup_dep(['pgsql', 'mysql'])

        os.chdir(self.srcdir)

        pgsql_dir = os.path.join(self.autodir, 'deps/pgsql/pgsql')
        mysql_dir = os.path.join(self.autodir, 'deps/mysql/mysql')

        # configure wants to get at pg_config, so add its path
        utils.system(
            'PATH=%s/bin:$PATH ./configure --with-mysql=%s --with-pgsql'
            % (pgsql_dir, mysql_dir))
        utils.make('-j %d' % utils.count_cpus())
Пример #55
0
    def setup(self, tarball='blktrace-git-latest.tar.gz'):
        tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
        utils.extract_tarball_to_dir(tarball, self.srcdir)

        self.job.setup_dep(['libaio'])
        libs = '-L' + self.autodir + '/deps/libaio/lib -laio'
        cflags = '-I ' + self.autodir + '/deps/libaio/include'
        var_libs = 'LIBS="' + libs + '"'
        var_cflags = 'CFLAGS="' + cflags + '"'
        self.make_flags = var_libs + ' ' + var_cflags

        os.chdir(self.srcdir)

        utils.system('patch -p1 < %s/Makefile.patch' % self.bindir)
        utils.system(self.make_flags + ' make')
Пример #56
0
    def setup(self, tarball='trace-cmd.tar.bz2', **kwargs):
        """
        Build and install trace-cmd from source.

        The tarball was obtained by checking the git repo at 09-14-2010,
        removing the Documentation and the .git folders, and compressing
        it.

        :param tarball: Path to trace-cmd tarball.
        :param **kwargs: Dictionary with additional parameters.
        """
        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("prefix='%s'" % self.builddir)
        utils.make("prefix='%s' install" % self.builddir)
Пример #57
0
    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()
Пример #58
0
    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)

        self.job.setup_dep(['libaio'])
        ldflags = '-L' + self.autodir + '/deps/libaio/lib'
        cflags = '-I' + self.autodir + '/deps/libaio/include'
        var_ldflags = 'LDFLAGS="' + ldflags + '"'
        var_cflags = 'CFLAGS="' + cflags + '"'
        self.make_flags = var_ldflags + ' ' + var_cflags

        os.chdir(self.srcdir)
        p1 = '0001-Minor-fixes-to-PAGE_SIZE-handling.patch'
        p2 = '0002-Enable-cross-compiling-for-fsx.patch'
        utils.system('patch -p1 < %s/%s' % (self.bindir, p1))
        utils.system('patch -p1 < %s/%s' % (self.bindir, p2))
        utils.system(self.make_flags + ' make fsx-linux')
Пример #59
0
    def setup(self, tarball='fio-2.99.tar.bz2'):
        """
        Compiles and installs fio.

        @see: http://brick.kernel.dk/snaps/fio-2.0.5.tar.bz2
        """
        tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
        utils.extract_tarball_to_dir(tarball, self.srcdir)

        self.job.setup_dep(['libaio'])
        ldflags = '-L' + self.autodir + '/deps/libaio/lib'
        cflags = '-I' + self.autodir + '/deps/libaio/include'
        var_ldflags = 'LDFLAGS="' + ldflags + '"'
        var_cflags = 'CFLAGS="' + cflags + '"'

        os.chdir(self.srcdir)
        utils.system('%s %s make' % (var_ldflags, var_cflags))
Пример #60
0
    def get_kernel_tree(self, base_tree):
        """Extract/link base_tree to self.build_dir"""

        # if base_tree is a dir, assume uncompressed kernel
        if os.path.isdir(base_tree):
            print 'Symlinking existing kernel source'
            if os.path.islink(self.build_dir):
                os.remove(self.build_dir)
            os.symlink(base_tree, self.build_dir)

        # otherwise, extract tarball
        else:
            os.chdir(os.path.dirname(self.src_dir))
            # Figure out local destination for tarball
            tarball = os.path.join(self.src_dir, os.path.basename(base_tree.split(';')[0]))
            utils.get_file(base_tree, tarball)
            print 'Extracting kernel tarball:', tarball, '...'
            utils.extract_tarball_to_dir(tarball, self.build_dir)