Пример #1
0
def runSanityTest(factory, machine, image):
    defaultenv['MACHINE'] = machine
    factory.addStep(ShellCommand, description=["Running sanity test for", 
                    machine, image], 
                    command=["yocto-autobuild-sanitytest", image], 
                    env=copy.copy(defaultenv), 
                    timeout=2400)
Пример #2
0
def setSDKVERSION(factory, defaultenv):
    if defaultenv['MIGPL']=="True":
        slavehome = "meta-intel-gpl"
    else:
        slavehome = defaultenv['ABTARGET']
    SDKVERSION = defaultenv['SLAVEBASEDIR'] + "/" + slavehome + "/build/meta-yocto/conf/distro/poky.conf"
    factory.addStep(shell.SetProperty(
                    command="cat " + SDKVERSION + "|grep 'DISTRO_VERSION ='|sed 's/DISTRO_VERSION = //'|sed 's/-${DATE}//'|sed 's/\"//g'",
                    property="SDKVERSION"))
Пример #3
0
def setLCONF(factory, defaultenv):
    if defaultenv['MIGPL']=="True":
        slavehome = "meta-intel-gpl"
    else:
        slavehome = defaultenv['ABTARGET']
    BBLAYER = defaultenv['SLAVEBASEDIR'] + "/" + slavehome + "/build/build/conf/bblayers.conf"
    factory.addStep(shell.SetProperty(
                    command="cat " + BBLAYER + "|grep LCONF |sed 's/LCONF_VERSION = \"//'|sed 's/\"//'",
                    property="LCONF_VERSION")) 
Пример #4
0
def add_package_build(type, factory, compile_command):
    build = '%(slavename)s'

    # Build
    cmd = compile_command + [type]
    factory.addStep(Compile(description = [type], descriptionDone = [type],
                            command = cmd, warningPattern = warnPat))

    # Get file name
    factory.addStep(FileUpload(slavesrc = type + '.txt',
                               property = 'package_name'))

    # Get file
    src = '%(package_name)s'
    file = '/tmp/%(slavename)s/' + src
    step = FileUpload(slavesrc = WithProperties(src),
                      masterdest = WithProperties(file))
    step.haltOnFailure = True
    step.flunkOnFailure = True
    factory.addStep(step)

    # Publish
    cmd = WithProperties('/host/bin/publish build ' + file + \
                             ' %(slavename)s %(got_revision)s %(buildnumber)s')
    MasterShellCommand.haltOnFailure = True
    MasterShellCommand.flunkOnFailure = True
    step = MasterShellCommand(command = cmd, property = 'publish_path',
                              url = (src, c['distURL'] + '%(publish_path)s'),
                              name = 'publish ' + type)
    factory.addStep(step)
Пример #5
0
def runPostamble(factory):
    factory.addStep(ShellCommand(description=["Setting destination"],
                    command=["sh", "-c", WithProperties('echo "%s" > ./deploy-dir', "DEST")],
                    env=copy.copy(defaultenv),
                    timeout=14400))
    if PUBLISH_BUILDS == "True":
        factory.addStep(ShellCommand, warnOnFailure=True, description="Ensuring DEST directory exists",
                        command=["sh", "-c", WithProperties("mkdir -p %s", "DEST")],
                        timeout=20)
        factory.addStep(ShellCommand, description="Creating CURRENT link",
                        command=["sh", "-c", WithProperties("rm -rf %s/../CURRENT; ln -s %s %s/../CURRENT", "DEST", "DEST", "DEST")],
                        timeout=20)
        factory.addStep(ShellCommand(
                        description="Making tarball dir",
                        command=["mkdir", "-p", "yocto"],
                        env=copy.copy(defaultenv),
                        timeout=14400))
Пример #6
0
def makeScriptsCheckout(factory):
	factory.addStep(RemoveDirectory(warnOnFailure=True, dir="/media/yocto-autobuilder-scripts"))
	factory.addStep(Git(repourl='https://github.com/adam-lee/yocto-autobuilder-scripts.git', workdir='/media/yocto-autobuilder-scripts'))	
Пример #7
0
def makeRepoCheckout(factory):
	factory.addStep(Repo(manifest_url="https://github.com/gumstix/Gumstix-YoctoProject-Repo.git", manifest_branch=defaultenv['BRANCH']))
	factory.addStep(ShellCommand(workdir="build", command=["repo", "manifest", "-r", "-o", "manifest.xml"], timeout=1000))
	factory.addStep(ShellCommand(workdir="build", command=["UploadToS3", "manifest.xml", WithProperties("%s", "branch"), defaultenv['MACHINE']], timeout=1000))
	factory.addStep(ShellCommand(workdir="build", command=["rm", "manifest.xml"], timeout=1000))
Пример #8
0
def makeCheckout(factory):
	if defaultenv['ABTARGET'] == "overo":
            factory.addStep(ShellCommand(workdir="./", command=["curl", "-o", "repo", "https://dl-ssl.google.com/dl/googlesource/git-repo/repo"], timeout=1000))
            factory.addStep(ShellCommand(workdir="./", command=["chmod", "a+x", "repo"], timeout=1000))
            factory.addStep(ShellCommand(workdir="./", command=["sudo", "mv", "repo", "/usr/local/bin"], timeout=1000))
	    factory.addStep(ShellCommand(workdir="build", command=["repo", "init", "-u", "https://github.com/gumstix/Gumstix-YoctoProject-Repo.git", "-b", WithProperties("%s", "branch")], timeout=1000))
            factory.addStep(ShellCommand(workdir="build/poky", command=["repo", "sync"], timeout=1000))
            factory.addStep(ShellCommand(workdir="build", command=["repo", "manifest", "-r", "-o", "manifest.xml"], timeout=1000))
            factory.addStep(ShellCommand(workdir="build", command=["UploadToS3", "manifest.xml", WithProperties("%s", "branch"), defaultenv['MACHINE']], timeout=1000))
            factory.addStep(ShellCommand(workdir="build", command=["rm", "manifest.xml"], timeout=1000))
Пример #9
0
def runPreamble(factory, target):
    factory.addStep(SetPropertiesFromEnv(variables=["SLAVEBASEDIR"]))
    factory.addStep(ShellCommand(doStepIf=getSlaveBaseDir,
                    env=copy.copy(defaultenv),
                    command='echo "Getting the slave basedir"'))
    if defaultenv['MIGPL']=="True":
        slavehome = "meta-intel-gpl"
    else:
        slavehome = defaultenv['ABTARGET']
    factory.addStep(shell.SetProperty(
                    command="uname -a",
                    property="UNAME"))
    factory.addStep(shell.SetProperty(
                    command="echo $HOSTNAME",
                    property="HOSTNAME"))
    factory.addStep(ShellCommand(
                    description=["Building on", WithProperties("%s", "HOSTNAME"),  WithProperties("%s", "UNAME")],
                    command=["echo", WithProperties("%s", "HOSTNAME"),  WithProperties("%s", "UNAME")]))
    factory.addStep(setDest(workdir=WithProperties("%s", "workdir"), btarget=target, abbase=defaultenv['ABBASE']))
Пример #10
0
def runArchPostamble(factory, distro, target):
        factory.addStep(ShellCommand(doStepIf=doNightlyArchTest,
                        description="Syncing bb_persist_data.sqlite3 to main persistdb area",
                        workdir="build/build/tmp/cache",
                        command=["cp", "-R", "bb_persist_data.sqlite3", WithProperties(defaultenv['PERSISTDB_DIR'] + "/%s/%s/" + distro + "/bb_persist_data.sqlite3", "buildername", "otherbranch")],
                        timeout=2000))
Пример #11
0
def runImageLinaro(factory):
    factory.addStep(ShellCommand, description=["Getting Overo Config file to build hwpack"],
                    command=["git", "clone", "https://github.com/adam-lee/linaro-overo-config.git"],
                    timeout=60, workdir="build/")
    factory.addStep(ShellCommand, description=["Cleaning old stuff"],
		    command=["rm", "-rf", "new_kernel_build;", "rm", "-rf", "linaro-image-tools"],
                    timeout=600, workdir="build/")
    factory.addStep(ShellCommand, description=["Cloning Linux Kernel"],
 		    command=["git", "clone", "https://github.com/adam-lee/linux-1.git", "-b", "omap-3.5"],
                    timeout=24400)
    factory.addStep(ShellCommand, description=["Cleaning old Ubuntu Kernel CI Tool"],
		    command=["rm", "-rf", "ubuntu-kernel-ci"],
                    timeout=600, workdir="build/")
    factory.addStep(ShellCommand, description=["Checking Out Ubuntu Kernel CI Tool"],
 		    command=["git", "clone", "https://github.com/adam-lee/ubuntu-kernel-ci.git", "-b", "overo"])
    factory.addStep(ShellCommand, description=["building hwpack"], 
		    command=["ubuntu-kernel-ci/scripts/package_kernel", "-k", "867031F1",  "--cfg", "ubuntu-kernel-ci/configs/sakoman-omap-3.5.cfg", "do_test_build_source_pkg=true", "do_lava_testing=true", "job_flavour=omap"])
    factory.addStep(ShellCommand, description=["Upload hwpack"], 
		    command=["UploadLinaroToS3WithMD5.py", "./"],
                    workdir="build/out")
Пример #12
0
def runImage(factory, machine, distro, bsplayer, provider, buildhistory):
    factory.addStep(RemoveDirectory(warnOnFailure=True, dir="build/build/tmp/deploy/images"))
    factory.addStep(RemoveDirectory(warnOnFailure=True, dir="build/build/conf"))
    factory.addStep(ShellCommand(haltOnFailure=True, doStepIf=checkBranchMaster,  description=["setting up build"],
                    command=["yocto-autobuild-preamble"],
                    workdir="build",
                    env=copy.copy(defaultenv),
                    timeout=24400))
    factory.addStep(ShellCommand(haltOnFailure=True, doStepIf=checkBranchDev,  description=["setting up build"],
                    command=["yocto-autobuild-preamble-danny"],
                    workdir="build", 
                    env=copy.copy(defaultenv),
                    timeout=24400))

    if distro.startswith("poky"):
        buildprovider="yocto"
    else:
        buildprovider="oe"
    factory.addStep(ShellCommand(doStepIf=getSlaveBaseDir,
                    env=copy.copy(defaultenv),
                    command='echo "Getting the slave basedir"'))
    slavehome = defaultenv['ABTARGET']
    defaultenv['MACHINE'] = machine
    factory.addStep(ShellCommand, haltOnFailure=True, description=["Building", machine, "gumstix-console-image"],
                    command=["yocto-autobuild", "gumstix-console-image", "-k", "-D"],
                    env=copy.copy(defaultenv),
                    timeout=24400)
    factory.addStep(ShellCommand, haltOnFailure=True, description=["Building", machine, "gumstix-xfce-image"],
                    command=["yocto-autobuild", "gumstix-xfce-image", "-k", "-D"],
                    env=copy.copy(defaultenv),
                    timeout=24400)
    factory.addStep(ShellCommand(warnOnFailure=True, description="uploading to S3", 
				 command=["UploadToS3WithMD5", "/media/build/tmp/deploy/images/",  WithProperties("%s", "branch"), defaultenv['MACHINE']], workdir="/media",
				 timeout=600))
    factory.addStep(ShellCommand(description="Shutting Down", 
				 command=["sudo", "halt"],
 				 timeout=600))
Пример #13
0
def setAllEnv(factory):
    factory.addStep(SetPropertiesFromEnv(variables=["SLAVEBASEDIR"]))
    factory.addStep(SetPropertiesFromEnv(variables=["BUILD_HISTORY_DIR"]))
    factory.addStep(SetPropertiesFromEnv(variables=["BUILD_HISTORY_REPO"]))
    factory.addStep(SetPropertiesFromEnv(variables=["BUILD_HISTORY_COLLECT"]))