From 0cfbaa31cd1f491cc11690543b5a6128305d92d8 Mon Sep 17 00:00:00 2001 From: Rob Savoye Date: Mon, 17 Nov 2014 17:47:45 +0000 Subject: rename cbuild to abe Change-Id: I5999d5375734b62a9ffe3d1ecf5335c178a545d3 --- README | 26 +- abe.sh | 1011 ++++++++++++++++++++++++++++++++ cbuild2.sh | 1011 -------------------------------- config/boards/README | 2 +- config/boards/tcwglava.exp | 2 +- config/boards/tcwgrob/arm-odroidU2.exp | 2 +- config/sources.conf | 2 +- configure | 30 +- configure.ac | 16 +- host.conf.in | 4 +- jenkins.sh | 36 +- lib/checkout.sh | 4 +- lib/common.sh | 2 +- lib/diff.sh | 8 +- lib/gerrit.sh | 6 +- lib/git-parser.sh | 2 +- lib/globals.sh | 4 +- lib/make.sh | 2 +- lib/merge.sh | 2 +- lib/package.sh | 10 +- lib/release.sh | 2 +- lib/stamp.sh | 2 +- runbenchmark.sh | 4 +- scripts/Backport.job | 8 +- scripts/BuildFarm.job | 8 +- scripts/MakeRelease.job | 18 +- tcwgweb.sh | 12 +- test-backport.sh | 12 +- test.sh | 32 +- testsuite/gerrit-tests.sh | 4 +- testsuite/git-parser-tests.sh | 2 +- testsuite/normalize-tests.sh | 2 +- testsuite/srcdir-tests.sh | 48 +- testsuite/test.sh | 30 +- testsuite/test_sources.conf | 2 +- validate.sh | 24 +- 36 files changed, 1196 insertions(+), 1196 deletions(-) create mode 100755 abe.sh delete mode 100755 cbuild2.sh diff --git a/README b/README index 8f03aaa..cd3a78a 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ README -Cbuildv2 is a bourne shell rewrite of the existing cbuild system as +Cbuildv2 is a bourne shell rewrite of the existing abe system as used by Linaro. While being oriented to the Linaro way of doing things, Cbuildv2 should be usable by others by just reconfiguring. @@ -23,7 +23,7 @@ following: full hostname of the build machine. Under this a directory is created for the target architecture. * remote snapshots - This is where remote tarballs are stored. This - currently defaults to cbuild.validation.linaro.org, which is + currently defaults to abe.validation.linaro.org, which is accessible via HTTP to the general public. If configure is executed without any parameters. the defaults are @@ -33,7 +33,7 @@ time. For example: $CBUILD-PATH/configure --with-local-snapshots=$CBUILD_PATH/snapshots --with-local-builds=$CBUILD-PATH/destdir ---with-remote-snapshots=cbuild@toolchain64.lab:/home/cbuild/var/snapshots/ +--with-remote-snapshots=abe@toolchain64.lab:/home/abe/var/snapshots/ This changes the 3 primary paths, including changing the remote host to use rsync or ssh to download tarballs instead of HTTP. You can @@ -41,8 +41,8 @@ execute ./configure --help to get the full list of configure time parameters. The configure process produces a host.conf file, with the default -settings. This file is read by cbuildv2 at runtime, so it's possible to -change the values and rerun cbuild2.sh to use the new values. Each +settings. This file is read by abe at runtime, so it's possible to +change the values and rerun abe.sh to use the new values. Each toolchain component also has a config file. The default version is copied at build time to the build tree. It is also possible to edit this file, usually called something like gcc.conf, to change the @@ -96,28 +96,28 @@ host, and contains the other packages needed to build GCC, like gmp. Snapshots is the primary location of all source tarballs. To list all the available snapshots, you can do this" - "cbuild2.sh --list snapshots". + "abe.sh --list snapshots". -You can also run cbuildv2 with the --interactive options, which will +You can also run abe with the --interactive options, which will display a subset of all the packages that matches the supplied string. To build a specific component, use the --build option to -cbuildv2. the --target option is also used for cross builds. For +abe. the --target option is also used for cross builds. For example: -"cbuild2.sh --target arm-none-linux-gnueabihf gcc-linaro-4.8.2013.07-1" +"abe.sh --target arm-none-linux-gnueabihf gcc-linaro-4.8.2013.07-1" This would fetch the source tarball for this release, build anything it needs to compile, the binutils for example, and then build these sources. You can also specify a URL to a source repository instead. For example: -"cbuild2.sh --target arm-none-linux-gnueabihf git://git.linaro.org/toolchain/eglibc.git" +"abe.sh --target arm-none-linux-gnueabihf git://git.linaro.org/toolchain/eglibc.git" To build an entire cross toolchain, the simplest way is to let -cbuildv2 control all the steps. Although it is also possible to do each +abe control all the steps. Although it is also possible to do each step separately. To build the full toolchain, do this: -"cbuild2.sh --target arm-none-linux-gnueabihf --build all" +"abe.sh --target arm-none-linux-gnueabihf --build all" --------------------------------------------------------------------- Older NOTES @@ -161,7 +161,7 @@ Features: * Queue jobs for LAVA * Lists possible versions and components for build -cbuild2 command line arguments: +abe command line arguments: ------------------------------- * --build (architecture for the build machine, default native) * --target (architecture for the target machine, default native) diff --git a/abe.sh b/abe.sh new file mode 100755 index 0000000..f82e7a4 --- /dev/null +++ b/abe.sh @@ -0,0 +1,1011 @@ +#!/bin/bash +# +# Copyright (C) 2013, 2014 Linaro, Inc +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +usage() +{ + # Format this section with 75 columns. + cat << EOF + ${abe} [''| [--timeout ] + [[--build [ --stage {1|2}]|all] + |[--checkout |all]] + [--ccache] [--check] [--enable {bootstrap|gerrit}] + [--disable {install|update|make_docs|building}] [--dryrun] [--dump] + [--fetch ] [--force] [--host ] [--help] + [--list] [--march ] [--manifest ] + [--parallel] [--release] [--set {libc}={glibc|eglibc|newlib}] + [--set {languages}={c|c++|fortran|go|lto|objc|java|ada}] + [--set {cflags|ldflags|runtestflgs|makeflags}=XXX] + [--set {package}={toolchain|gdb|sysroot}] + [--snapshots ] [--target ] [--usage] + [--interactive] + [{binutils|gcc|gmp|mpft|mpc|eglibc|glibc|newlib} + =]] + +EOF + return 0 +} + +help() +{ + # Format this section with 75 columns. + cat << EOF +NAME + + ${abe} - the Linaro Toolchain Build Framework. + +SYNOPSIS + +EOF + usage + cat << EOF +KEY + + [--foo] Optional switch + [] Optional user specified field + Non-optional user specified field. + {foo|bar|bat} Non-optional choice field. + [{foo|bar|bat}] Optional choice field. + [foo] Optional field + [''] Optional Empty field + +DESCRIPTION + + ${abe} is a toolchain build framework. The primary purpose of + ${abe} is to unify the method used to build cross, native, and + Canadian-cross GNU toolchains. + +PRECONDITIONS + + Autoconf (configure) must be run in order to construct the build + directory and host.conf file before it is valid to run ${abe}. + +OPTIONS + + '' Specifying no options will display synopsis information. + + --build {|all} + + + To build a package version that corresponds to an + identifier in sources.conf do --build , e.g., --build gcc.git. + + To build a package version that corresponds to a + snapshot archive do --build , + e.g., --build gcc-linaro-4.7-2014.01. + + NOTE: to build GCC stage1 or stage2 use the --stage + flag, as described below, along with --build gcc, + e.g. --build gcc --stage 2. + + all + Build the entire toolchain and populate the + sysroot. + + --ccache Use ccache when building packages. + + --check + Run make check on packages. For cross builds this will run + the tests on native hardware. + + --checkout [~branch][@revision]|all + + [~branch][@revision] + This will checkout the package designated by the + source.conf identifier with an optional + branch and/or revision designation. + + all + This will checkout all of the sources for a + complete build as specified by the config/ .conf + files. + + --disable {install} + + install + Disable the make install stage of packages, which + is enabled by default. + + update + Don't update source repositories before building. + + make_docs + Don't make the toolchain package documentation. + + building + Don't build anything. This is only useful when + using --tarbin, --tarsrc, --tarballs. + This is a debugging aid for developers, as it + assumes everything built correctly... + + --dryrun Run as much of ${abe} as possible without doing any + actual configuration, building, or installing. + + --dump Dump configuration file information for this build. + + --enable {bootstrap} + + bootstrap + Enable gcc bootstrapping, which is disabled by + default. + + gerrit + Enable posting comments to Gerrit on the build + progress. + + --fetch + + Fetch the specified URL into the snapshots directory. + + --force Force download packages and force rebuild packages. + + --help|-h Display this usage information. + + --host + + Set the host triple. This represents the machine where + the packages being built will run. For a cross toolchain + build this would represent where the compiler is run. + + --infrastructure Download and install the infrastructure libraries. + + --interactive Interactively select packages from the snapshots file. + + --list List the available snapshots or configured repositories. + + --march + + Specify to be the default target architecture for a + specific toolchain, overriding the default. Example: + + --target arm-linux-gnueabihf --march armv8-a + + Note: There is no cross-checking to make sure that the passed + --target value is compatible with the passed --march value. + + --manifest + + Source the to override the default + configuration. This is used to reproduce an identical + toolchain build from manifest files generated by a previous + build. + + --parallel Set the make flags for parallel builds. + + --prefix Set an alternate value for the prefix used to configure. + + --release + The build system will package the resulting toolchain as a + release with the 'name' prefix. + + --set {libc}={glibc|eglibc|newlib} + + The default value is stored in lib/global.sh. This + setting overrides the default. Specifying a libc + other than newlib on baremetal targets is an error. + + --set {cflags|ldflags|runtestflags|makeflags}=XXX + This overrides the default values used for CFLAGS, + LDFLAGS, RUNTESTFLAGS, and MAKEFLAGS. + + --set {package}={toolchain|gdb|sysroot} + This limits the default set of packages to the specified set. + This only applies to the --tarbin, --tarsrc, and --tarballs + command lines options, and are primarily to be only used by + developers. + + --set {labguages}={c|c++|fortran|go|lto|objc|java|ada} + This changes the default set of GCC front ends that get built. + The default set for most platforms is c, c++, go, fortran, + and lto. + + --snapshots /path/to/alternative/local_snapshots/directory + Use an alternative path to a local snapshots directory. + + --stage {1|2} + If --build <*gcc*> is passed, then --stage {1|2} will cause + stage1 or stage2 of gcc to be built. If --build <*gcc*> is + not passed then --stage {1|2} does nothing. + + --tarball + Build source and binary tarballs after a successful build. + + --tarsrc + Build source tarballs after a successful build. + + --tarbin + Build binary tarballs after a successful build. + + --target [|''] + + This sets the target triple. The GNU target triple + represents where the binaries built by the toolchain will + execute. + + '' + Build the toolchain native to the hardware that + ${abe} is running on. + + + + x86_64-none-linux-gnu + arm-none-linux-gnueabi + arm-none-linux-gnueabihf + armeb-none-linux-gnueabihf + aarch64-none-linux-gnu + aarch64-none-elf + aarch64_be-none-elf + aarch64_be-none-linux-gnu + + If is not the same as the hardware + that ${abe} is running on then build the + toolchain as a cross toolchain. + + --timeout + + Use as the timeout value for wget when + fetching snapshot packages. + + --usage Display synopsis information. + + [{binutils|gcc|gmp|mpft|mpc|eglibc|glibc|newlib}=] + + This option specifies a particular version of a package + that might differ from the default version in the + package config files. + + For a specific package use a version tag that matches a + setting in a sources.conf file, a snapshots identifier, + or a direct repository URL. + + Examples: + + # Matches an identifier in sources.conf: + glibc=glibc.git + + # Matches a tar snapshot in md5sums: + glibc=eglibc-linaro-2.17-2013.07 + + # Direct URL: + glibc=git://sourceware.org/git/glibc.git + +EXAMPLES + + Build a Linux cross toolchain: + + ${abe} --target arm-none-linux-gnueabihf --build all + + Build a Linux cross toolchain with glibc as the clibrary: + + ${abe} --target arm-none-linux-gnueabihf --set libc=glibc --build all + + Build a bare metal toolchain: + + ${abe} --target aarch64-none-elf --build all + +PRECONDITION FILES + + ~/.aberc ${abe} user specific configuration file + + host.conf Generated by configure from host.conf.in. + +CBUILD GENERATED FILES AND DIRECTORIES + + builds/ All builds are stored here. + + snapshots/ Package sources are stored here. + + snapshots/infrastructure Infrastructure (non-distributed) sources are stored + here. + + snapshots/md5sums The snapshots file of maintained package tarballs. + +AUTHOR + Rob Savoye + Ryan S. Arnold + +EOF + return 0 +} + +# If there are no command options output the usage message. +if test $# -lt 1; then + echo "Usage:" + usage + echo "Run \"${abe} --help\" for detailed usage information." + exit 1 +fi + +if test "`echo $* | grep -c -- -help`" -gt 0; then + help + exit 0 +fi + +# load the configure file produced by configure +if test -e "${PWD}/host.conf"; then + . "${PWD}/host.conf" +else + echo "ERROR: no host.conf file! Did you run configure?" 1>&2 + exit 1 +fi + +# load commonly used functions +abe="`which $0`" +topdir="${abe_path}" +abe="`basename $0`" + +. "${topdir}/lib/common.sh" || exit 1 + +# this is used to launch builds of dependant components +command_line_arguments=$* + +# +# These functions actually do something +# + +# Determine whether the clibrary setting passed as $1 is compatible with the +# designated target. +crosscheck_clibrary_target() +{ + local test_clibrary=$1 + local test_target=$2 + case ${test_target} in + arm*-eabi|aarch64*-*elf|*-mingw32) + # Bare metal targets only support newlib. + if test x"${test_clibrary}" != x"newlib"; then + error "${test_target} is only compatible with newlib." + return 1 + fi + ;; + *) + # No specified target, or non-baremetal targets. + ;; + esac + return 0 +} + +set_package() +{ + local package="`echo $1 | cut -d '=' -f 1`" + local setting="`echo $* | cut -d '=' -f 2-3`" + + case ${package} in + languages|la*) + with_languages="${setting}" + notice "Setting list of languages to build to ${setting}" + return 0 + ;; + packages|pa*) + with_packages="${setting}" + notice "Setting list of packages to build to ${setting}" + return 0 + ;; + runtestflags|ru*) + override_runtestflags="${setting}" + notice "Overriding ${setting} to RUNTESTFLAGS" + return 0 + ;; + makeflags|ma*) +# override_makeflags="${setting}" + set make_flags="${make_flags} ${setting}" + notice "Overriding ${setting} to MAKEFLAGS" + return 0 + ;; + ldflags|ld*) + override_ldflags="${setting}" + notice "Overriding ${setting} to LDFLAGS" + return 0 + ;; + cflags|cf*) + override_cflags="${setting}" + notice "Overriding ${setting} to CFLAGS" + return 0 + ;; + libc) + # Range check user input against supported C libraries. + case ${setting} in + glibc|eglibc|newlib) + + # Verify that the user specified libc is compatible with + # the user specified target. + crosscheck_clibrary_target ${setting} ${target} + if test $? -gt 0; then + return 1 + fi + + clibrary="${setting}" + notice "Using '${setting}' as the C library as directed by \"--set libc=${setting}\"." + return 0 + ;; + *) + error "'${setting}' is an unsupported libc option." + ;; + esac + ;; + *) + error "'${package}' is not a supported package for --set." + ;; + esac + + return 1 +} + +build_failure() +{ + local time="`expr ${SECONDS} / 60`" + error "Build process failed after ${time} minutes" + + if test x"${gerrit}" = xyes; then + gerrit_build_status ${gcc_version} 1 + fi + exit 1 +} + +build_success() +{ + local time="`expr ${SECONDS} / 60`" + notice "Build process succeeded after ${time} minutes" + + if test x"${gerrit}" = xyes; then + gerrit_build_status ${gcc_version} 0 + fi + + return 0 +} + +test_success() +{ + local time="`expr ${SECONDS} / 60`" + notice "Test run completed after ${time} minutes" + + if test x"${gerrit}" = xyes; then + gerrit_build_status ${gcc_version} 6 + fi + + return 0 +} + +# Switches that require a following directive need to make sure they don't +# parse the -- of the following switch. +check_directive() +{ + switch="$1" + long="$2" + short="$3" + directive="$4" + + if test `echo ${switch} | grep -c "\-${short}.*=" ` -gt 0; then + error "A '=' is invalid after --${long}. A space is expected between the switch and the directive." + elif test x"$directive" = x; then + error "--${long} requires a directive. See --usage for details.' " + build_failure + elif test `echo ${directive} | egrep -c "^\-+"` -gt 0; then + error "--${long} requires a directive. ${abe} found the next -- switch. See --usage for details.' " + else + return 0 + fi + build_failure +} + +# This gets a list from a remote server of the available tarballs. We use HTTP +# instead of SSH so it's more accessible to those behind nasty firewalls. +# base - already checkout out source trees +# snapshots - tarballs of various source snapshots +# prebuilt - prebuilt executables +get_list() +{ + echo "Get version list for $1..." + + # http://abe.validation.linaro.org/snapshots + case $1 in + testcode|t*) + testcode="`grep testcode ${local_snapshots}/testcode/md5sums | cut -d ' ' -f 3 | cut -d '/' -f 2`" + echo "${testcode}" + ;; + snapshots|s*) + snapshots="`egrep -v "\.asc|\.diff|\.txt|xdelta|base|infrastructure|testcode" ${local_snapshots}/md5sums | cut -d ' ' -f 3`" + echo "${snapshots}" + ;; + infrastructure|i*) + infrastructure="`grep infrastructure ${local_snapshots}/md5sums | cut -d ' ' -f 3 | cut -d '/' -f 2`" + echo "${infrastructure}" + ;; + esac + return 0 +} + +# Get some info on the build system +# $1 - If specified, it's the hostname of the remote system +get_build_machine_info() +{ + if test x"$1" = x; then + cpus="`getconf _NPROCESSORS_ONLN`" + libc="`getconf GNU_LIBC_VERSION`" + kernel="`uname -r`" + build_arch="`uname -p`" + hostname="`uname -n`" + distribution="`lsb_release -sc`" + else + # FIXME: this assumes the user has their ssh keys setup to the point + # where the don't need a password but is secure. + echo "Getting config info from $1" + cpus="`ssh $1 getconf _NPROCESSORS_ONLN`" + libc="`ssh $1 getconf GNU_LIBC_VERSION`" + kernel="`ssh $1 uname -r`" + build_arch="`ssh $1 uname -p`" + hostname="`ssh $1 uname -n`" + distribution="`ssh $1 lsb_release -sc`" + fi +} + +# Takes no arguments. Dumps all the important config data +dump() +{ + # These variables are always determined dynamically at run time + echo "Target is: ${target}" + echo "GCC is: ${gcc}" + echo "GCC version: ${gcc_version}" + echo "Sysroot is: ${sysroots}" + echo "C library is: ${clibrary}" + + # These variables have default values which we don't care about + echo "Binutils is: ${binutils}" + echo "Config file is: ${configfile}" + echo "Snapshot URL is: ${local_snapshots}" + echo "DB User name is: ${dbuser}" + echo "DB Password is: ${dbpasswd}" + + echo "Build # cpus is: ${cpus}" + echo "Kernel: ${kernel}" + echo "Build Arch: ${build_arch}" + echo "Hostname: ${hostname}" + echo "Distribution: ${distribution}" + + echo "Bootstrap ${bootstrap}" + echo "Gerrit ${gerrit}" + echo "Install ${install}" + echo "Source Update ${supdate}" + echo "Make Documentation ${make_docs}" + + if test x"${default_march}" != x; then + echo "Default march ${default_march}" + fi +} + +export PATH="${local_builds}/destdir/${build}/bin:$PATH" + +# do_ switches are commands that should be executed after processing all +# other switches. +do_dump= +do_checkout= +do_build= +do_build_stage=stage2 + +# Process the multiple command line arguments +while test $# -gt 0; do + # Get a URL for the source code for this toolchain component. The + # URL can be either for a source tarball, or a checkout via svn, bzr, + # or git + case "$1" in + --bu*|-bu*) # build + check_directive $1 build bu $2 + + # Save and process this after all other elements have been processed. + do_build="$2" + + # Shift off the 'all' or the package identifier. + shift + ;; + --check|-check) + runtests=yes + ;; + --checkout*|-checkout*) + check_directive $1 checkout "checkout" $2 + # Save and process this after all other elements have been processed. + do_checkout="$2" + + # Shift off the 'all' or the package identifier. + shift + ;; + --march*|-march*) + check_directive $1 march "march" $2 + default_march=$2 + shift + ;; + --host|-h*) + host=$2 + shift + ;; + --manifest*|-m*) + check_directive $1 manifest "m" $2 + # source a manifest file if there is one + if test -f $2 ; then + . $2 + fi + echo $gcc_version + ;; + # download and install the infrastructure libraries GCC depends on + --inf*|infrastructure) + infrastructure + ;; + --pr*|--prefix*) + check_directive $1 prefix "pr" $2 + prefix=$2 + shift + ;; + --sy*) # sysroot + set_sysroot ${url} + shift + ;; + --ccache|-cc*) + use_ccache=yes + ;; + --clean|-cl*) + clean_build ${url} + shift + ;; + --config) + set_config ${url} + shift + ;; + --db-user) + set_dbuser ${url} + shift + ;; + --db-passwd) + set_dbpasswd ${url} + shift + ;; + --dry*|-dry*) + dryrun=yes + ;; + --dump) + do_dump=yes + #dump ${url} + #shift + ;; + --fetch|-d) + fetch ${url} + shift + ;; + --force|-f) + force=yes + ;; + --interactive|-i) + interactive=yes + ;; + --list|-l) + get_list $2 + shift + ;; + --nodepends|-n) # nodepends + nodepends=yes + ;; + --parallel|-par*) # parallel + parallel=yes + ;; + --rel*|-rel*) + check_directive $1 release "rel" $2 + release=$2 + shift + ;; + --set*|-set*) + check_directive $1 set "set" $2 + + # Test if --target follows the --set command put --set and it's + # directive on to the back of the inputs. This is because clibrary + # validity depends on the target. + if test "`echo $@ | grep -c "\-targ.*"`" -gt 0; then + # Push $1 and $2 onto the back of the inputs for later processing. + set -- $@ $1 $2 + # Shift off them off the front. + shift 2; + continue; + fi + + set_package $2 + if test $? -gt 0; then + # The failure particular reason is output within the + # set_package function. + build_failure + fi + shift + ;; + --snap*|-snap*) + check_directive $1 snapshots snap $2 + local_snapshots=$2 + shift + ;; + --sta*|-sta*) + check_directive $1 stage sta $2 + if test x"$2" != x"2" -a x"$2" != x"1"; then + error "--stage requires a 2 or 1 directive." + build_failure + fi + do_build_stage="stage$2" + shift + ;; + --tarball*|-tarba*) + tarsrc=yes + tarbin=yes + ;; + --tarbin*|-tarbi*) + tarbin=yes + ;; + --tarsrc*|-tars*) + tarsrc=yes + ;; + --targ*|-targ*) # target + check_directive $1 target targ $2 + + target=$2 + sysroots=${sysroots}/${target} + + # Certain targets only make sense using newlib as the default + # clibrary. Override the normal default in lib/global.sh. The + # user might try to override this with --set libc={glibc|eglibc} + # or {glibc|eglibc}= but that will be caught elsewhere. + case ${target} in + arm*-eabi*|arm*-elf|aarch64*-*elf|*-mingw32) + clibrary="newlib" + ;; + *) + ;; + esac + shift + ;; + --testcode|te*) + testcode + ;; + --time*|-time*) + check_directive $1 timeout "time" $2 + if test $2 -lt 11; then + wget_timeout=$2 + else + # FIXME: Range check for non-numerical values. + wget_timeout=10 + fi + shift + ;; + # These steps are disabled by default but are sometimes useful. + --enable*|--disable*) + case "$1" in + --enable*) + check_directive $1 "enable" "enable" $2 + value="yes" + ;; + --disable*) + check_directive $1 "disable" "disable" $2 + value="no" + ;; + *) + error "Internal failure. Should never happen." + build_failure + ;; + esac + + case $2 in + bootstrap) + bootstrap="${value}" + ;; + gerrit) + gerrit="${value}" + # Initialize settings for gerrit + gerrit_info $HOME + if test x"${gerrit_branch}" != x; then + gcc_version="gcc.git~${gerrit_branch}@${gerrit_revision}" + fi + ;; + alltests) + alltests="${value}" + ;; + install) + install="${value}" + ;; + building) + building="${value}" + ;; + parallel) + parallel="$value" + ;; + schroot_test) + schroot_test="${value}" + ;; + update) + supdate="${value}" + ;; + + make_docs) + make_docs="${value}" + ;; + *) + error "$2 not recognized as a valid $1 directive." + build_failure + ;; + esac + shift + ;; + --merge*) + check_directive $1 merge merge $2 + merge_branch $2 + shift + ;; + --merge-diff*) + check_directive $1 "merge-diff" "merge-diff" $2 + merge_diff $2 + shift + ;; + --clobber) + clobber=yes + ;; + --help|-h|--h) + help + exit 0 + ;; + --usage) + echo "Usage:" + usage + echo "Run \"${abe} --help\" for detailed usage information." + exit 0 + ;; + *) + if test `echo $1 | grep -c =` -gt 0; then + name="`echo $1 | cut -d '=' -f 1`" + value="`echo $1 | cut -d '=' -f 2`" + case ${name} in + b*|binutils) + binutils_version="`echo ${value}`" + ;; + gc*|gcc) + gcc_version="${value}" + ;; + gm*|gmp) + gmp_version="${value}" + ;; + gd*|gdb) + gdb_version="${value}" + ;; + mpf*|mpfr) + mpfr_version="${value}" + ;; + mpc) + mpc_version="${value}" + ;; + eglibc|glibc|newlib) + # Test if --target follows one of these clibrary set + # commands. If so, put $1 onto the back of the inputs. + # This is because clibrary validity depends on the target. + if test "`echo $@ | grep -c "\-targ.*"`" -gt 0; then + # Push $1 onto the back of the inputs for later processing. + set -- $@ $1 + # Shift it off the front. + shift + continue; + fi + + # Only allow valid combinations of target and clibrary. + crosscheck_clibrary_target ${name} ${target} + if test $? -gt 0; then + build_failure + fi + # Continue to process individually. + case ${name} in + eglibc) + clibrary="eglibc" + eglibc_version="${value}" + ;; + glibc) + clibrary="glibc" + glibc_version="${value}" + ;; + n*|newlib) + clibrary="newlib" + newlib_version="${value}" + ;; + *) + ;; + esac + ;; + *) + ;; + esac + else + error "$1: Command not recognized." + build_failure + fi + ;; + esac + if test $# -gt 0; then + shift + fi +done + +# if test x"${tarbin}" = x"yes" -o x"${tarsrc}" = x"yes"; then +# warning "No testsuite will be run when building tarballs!" +# runtests=no +# fi + +timeout_save=${wget_timeout} +wget_timeout=10 +# Get the md5sums file, which is used later to get the URL for remote files +fetch md5sums +wget_timeout=${timeout_save} + +if test ! -z ${do_dump}; then + dump +fi + +if test ! -z ${do_checkout}; then + if test x"${do_checkout}" != x"all"; then + url="`get_source ${do_checkout}`" + if test $? -gt 0; then + error "Couldn't find the source for ${do_checkout}" + build_failure + fi + + checkout ${url} + if test $? -gt 0; then + error "--checkout ${url} failed." + build_failure + fi + else + checkout_all + if test $? -gt 0; then + error "--checkout all failed." + build_failure + fi + fi +fi + +if test ! -z ${do_build}; then + if test x"${do_build}" != x"all"; then + gitinfo="`get_source ${do_build}`" + if test x"${gitinfo}" = x; then + error "Couldn't find the source for ${do_build}" + build_failure + else + build_param= + # If we're just building gcc then we need to pick a 'stage'. + # The user might have specified a stage so we use that if + # it's set. + if test `echo ${do_build} | grep -c "gcc"` -gt 0; then + build_param=${do_build_stage} + fi + build ${gitinfo}${build_param:+ ${build_param}} + if test $? -gt 0; then + error "Building ${gitinfo} failed." + build_failure + fi + fi + else + buildingall=yes + build_all + if test $? -gt 0; then + error "Build all failed." + build_failure + fi + fi +fi + +time="`expr ${SECONDS} / 60`" +if test ! -z ${do_build}; then + notice "Complete build process took ${time} minutes" +elif test ! -z ${do_checkout}; then + notice "Complete checkout process took ${time} minutes" +fi +exit 0 diff --git a/cbuild2.sh b/cbuild2.sh deleted file mode 100755 index 42fd0cb..0000000 --- a/cbuild2.sh +++ /dev/null @@ -1,1011 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013, 2014 Linaro, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# - -usage() -{ - # Format this section with 75 columns. - cat << EOF - ${cbuild2} [''| [--timeout ] - [[--build [ --stage {1|2}]|all] - |[--checkout |all]] - [--ccache] [--check] [--enable {bootstrap|gerrit}] - [--disable {install|update|make_docs|building}] [--dryrun] [--dump] - [--fetch ] [--force] [--host ] [--help] - [--list] [--march ] [--manifest ] - [--parallel] [--release] [--set {libc}={glibc|eglibc|newlib}] - [--set {languages}={c|c++|fortran|go|lto|objc|java|ada}] - [--set {cflags|ldflags|runtestflgs|makeflags}=XXX] - [--set {package}={toolchain|gdb|sysroot}] - [--snapshots ] [--target ] [--usage] - [--interactive] - [{binutils|gcc|gmp|mpft|mpc|eglibc|glibc|newlib} - =]] - -EOF - return 0 -} - -help() -{ - # Format this section with 75 columns. - cat << EOF -NAME - - ${cbuild2} - the Linaro Toolchain Build Framework. - -SYNOPSIS - -EOF - usage - cat << EOF -KEY - - [--foo] Optional switch - [] Optional user specified field - Non-optional user specified field. - {foo|bar|bat} Non-optional choice field. - [{foo|bar|bat}] Optional choice field. - [foo] Optional field - [''] Optional Empty field - -DESCRIPTION - - ${cbuild2} is a toolchain build framework. The primary purpose of - ${cbuild2} is to unify the method used to build cross, native, and - Canadian-cross GNU toolchains. - -PRECONDITIONS - - Autoconf (configure) must be run in order to construct the build - directory and host.conf file before it is valid to run ${cbuild2}. - -OPTIONS - - '' Specifying no options will display synopsis information. - - --build {|all} - - - To build a package version that corresponds to an - identifier in sources.conf do --build , e.g., --build gcc.git. - - To build a package version that corresponds to a - snapshot archive do --build , - e.g., --build gcc-linaro-4.7-2014.01. - - NOTE: to build GCC stage1 or stage2 use the --stage - flag, as described below, along with --build gcc, - e.g. --build gcc --stage 2. - - all - Build the entire toolchain and populate the - sysroot. - - --ccache Use ccache when building packages. - - --check - Run make check on packages. For cross builds this will run - the tests on native hardware. - - --checkout [~branch][@revision]|all - - [~branch][@revision] - This will checkout the package designated by the - source.conf identifier with an optional - branch and/or revision designation. - - all - This will checkout all of the sources for a - complete build as specified by the config/ .conf - files. - - --disable {install} - - install - Disable the make install stage of packages, which - is enabled by default. - - update - Don't update source repositories before building. - - make_docs - Don't make the toolchain package documentation. - - building - Don't build anything. This is only useful when - using --tarbin, --tarsrc, --tarballs. - This is a debugging aid for developers, as it - assumes everything built correctly... - - --dryrun Run as much of ${cbuild2} as possible without doing any - actual configuration, building, or installing. - - --dump Dump configuration file information for this build. - - --enable {bootstrap} - - bootstrap - Enable gcc bootstrapping, which is disabled by - default. - - gerrit - Enable posting comments to Gerrit on the build - progress. - - --fetch - - Fetch the specified URL into the snapshots directory. - - --force Force download packages and force rebuild packages. - - --help|-h Display this usage information. - - --host - - Set the host triple. This represents the machine where - the packages being built will run. For a cross toolchain - build this would represent where the compiler is run. - - --infrastructure Download and install the infrastructure libraries. - - --interactive Interactively select packages from the snapshots file. - - --list List the available snapshots or configured repositories. - - --march - - Specify to be the default target architecture for a - specific toolchain, overriding the default. Example: - - --target arm-linux-gnueabihf --march armv8-a - - Note: There is no cross-checking to make sure that the passed - --target value is compatible with the passed --march value. - - --manifest - - Source the to override the default - configuration. This is used to reproduce an identical - toolchain build from manifest files generated by a previous - build. - - --parallel Set the make flags for parallel builds. - - --prefix Set an alternate value for the prefix used to configure. - - --release - The build system will package the resulting toolchain as a - release with the 'name' prefix. - - --set {libc}={glibc|eglibc|newlib} - - The default value is stored in lib/global.sh. This - setting overrides the default. Specifying a libc - other than newlib on baremetal targets is an error. - - --set {cflags|ldflags|runtestflags|makeflags}=XXX - This overrides the default values used for CFLAGS, - LDFLAGS, RUNTESTFLAGS, and MAKEFLAGS. - - --set {package}={toolchain|gdb|sysroot} - This limits the default set of packages to the specified set. - This only applies to the --tarbin, --tarsrc, and --tarballs - command lines options, and are primarily to be only used by - developers. - - --set {labguages}={c|c++|fortran|go|lto|objc|java|ada} - This changes the default set of GCC front ends that get built. - The default set for most platforms is c, c++, go, fortran, - and lto. - - --snapshots /path/to/alternative/local_snapshots/directory - Use an alternative path to a local snapshots directory. - - --stage {1|2} - If --build <*gcc*> is passed, then --stage {1|2} will cause - stage1 or stage2 of gcc to be built. If --build <*gcc*> is - not passed then --stage {1|2} does nothing. - - --tarball - Build source and binary tarballs after a successful build. - - --tarsrc - Build source tarballs after a successful build. - - --tarbin - Build binary tarballs after a successful build. - - --target [|''] - - This sets the target triple. The GNU target triple - represents where the binaries built by the toolchain will - execute. - - '' - Build the toolchain native to the hardware that - ${cbuild2} is running on. - - - - x86_64-none-linux-gnu - arm-none-linux-gnueabi - arm-none-linux-gnueabihf - armeb-none-linux-gnueabihf - aarch64-none-linux-gnu - aarch64-none-elf - aarch64_be-none-elf - aarch64_be-none-linux-gnu - - If is not the same as the hardware - that ${cbuild2} is running on then build the - toolchain as a cross toolchain. - - --timeout - - Use as the timeout value for wget when - fetching snapshot packages. - - --usage Display synopsis information. - - [{binutils|gcc|gmp|mpft|mpc|eglibc|glibc|newlib}=] - - This option specifies a particular version of a package - that might differ from the default version in the - package config files. - - For a specific package use a version tag that matches a - setting in a sources.conf file, a snapshots identifier, - or a direct repository URL. - - Examples: - - # Matches an identifier in sources.conf: - glibc=glibc.git - - # Matches a tar snapshot in md5sums: - glibc=eglibc-linaro-2.17-2013.07 - - # Direct URL: - glibc=git://sourceware.org/git/glibc.git - -EXAMPLES - - Build a Linux cross toolchain: - - ${cbuild2} --target arm-none-linux-gnueabihf --build all - - Build a Linux cross toolchain with glibc as the clibrary: - - ${cbuild2} --target arm-none-linux-gnueabihf --set libc=glibc --build all - - Build a bare metal toolchain: - - ${cbuild2} --target aarch64-none-elf --build all - -PRECONDITION FILES - - ~/.cbuildrc ${cbuild2} user specific configuration file - - host.conf Generated by configure from host.conf.in. - -CBUILD GENERATED FILES AND DIRECTORIES - - builds/ All builds are stored here. - - snapshots/ Package sources are stored here. - - snapshots/infrastructure Infrastructure (non-distributed) sources are stored - here. - - snapshots/md5sums The snapshots file of maintained package tarballs. - -AUTHOR - Rob Savoye - Ryan S. Arnold - -EOF - return 0 -} - -# If there are no command options output the usage message. -if test $# -lt 1; then - echo "Usage:" - usage - echo "Run \"${cbuild2} --help\" for detailed usage information." - exit 1 -fi - -if test "`echo $* | grep -c -- -help`" -gt 0; then - help - exit 0 -fi - -# load the configure file produced by configure -if test -e "${PWD}/host.conf"; then - . "${PWD}/host.conf" -else - echo "ERROR: no host.conf file! Did you run configure?" 1>&2 - exit 1 -fi - -# load commonly used functions -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" - -. "${topdir}/lib/common.sh" || exit 1 - -# this is used to launch builds of dependant components -command_line_arguments=$* - -# -# These functions actually do something -# - -# Determine whether the clibrary setting passed as $1 is compatible with the -# designated target. -crosscheck_clibrary_target() -{ - local test_clibrary=$1 - local test_target=$2 - case ${test_target} in - arm*-eabi|aarch64*-*elf|*-mingw32) - # Bare metal targets only support newlib. - if test x"${test_clibrary}" != x"newlib"; then - error "${test_target} is only compatible with newlib." - return 1 - fi - ;; - *) - # No specified target, or non-baremetal targets. - ;; - esac - return 0 -} - -set_package() -{ - local package="`echo $1 | cut -d '=' -f 1`" - local setting="`echo $* | cut -d '=' -f 2-3`" - - case ${package} in - languages|la*) - with_languages="${setting}" - notice "Setting list of languages to build to ${setting}" - return 0 - ;; - packages|pa*) - with_packages="${setting}" - notice "Setting list of packages to build to ${setting}" - return 0 - ;; - runtestflags|ru*) - override_runtestflags="${setting}" - notice "Overriding ${setting} to RUNTESTFLAGS" - return 0 - ;; - makeflags|ma*) -# override_makeflags="${setting}" - set make_flags="${make_flags} ${setting}" - notice "Overriding ${setting} to MAKEFLAGS" - return 0 - ;; - ldflags|ld*) - override_ldflags="${setting}" - notice "Overriding ${setting} to LDFLAGS" - return 0 - ;; - cflags|cf*) - override_cflags="${setting}" - notice "Overriding ${setting} to CFLAGS" - return 0 - ;; - libc) - # Range check user input against supported C libraries. - case ${setting} in - glibc|eglibc|newlib) - - # Verify that the user specified libc is compatible with - # the user specified target. - crosscheck_clibrary_target ${setting} ${target} - if test $? -gt 0; then - return 1 - fi - - clibrary="${setting}" - notice "Using '${setting}' as the C library as directed by \"--set libc=${setting}\"." - return 0 - ;; - *) - error "'${setting}' is an unsupported libc option." - ;; - esac - ;; - *) - error "'${package}' is not a supported package for --set." - ;; - esac - - return 1 -} - -build_failure() -{ - local time="`expr ${SECONDS} / 60`" - error "Build process failed after ${time} minutes" - - if test x"${gerrit}" = xyes; then - gerrit_build_status ${gcc_version} 1 - fi - exit 1 -} - -build_success() -{ - local time="`expr ${SECONDS} / 60`" - notice "Build process succeeded after ${time} minutes" - - if test x"${gerrit}" = xyes; then - gerrit_build_status ${gcc_version} 0 - fi - - return 0 -} - -test_success() -{ - local time="`expr ${SECONDS} / 60`" - notice "Test run completed after ${time} minutes" - - if test x"${gerrit}" = xyes; then - gerrit_build_status ${gcc_version} 6 - fi - - return 0 -} - -# Switches that require a following directive need to make sure they don't -# parse the -- of the following switch. -check_directive() -{ - switch="$1" - long="$2" - short="$3" - directive="$4" - - if test `echo ${switch} | grep -c "\-${short}.*=" ` -gt 0; then - error "A '=' is invalid after --${long}. A space is expected between the switch and the directive." - elif test x"$directive" = x; then - error "--${long} requires a directive. See --usage for details.' " - build_failure - elif test `echo ${directive} | egrep -c "^\-+"` -gt 0; then - error "--${long} requires a directive. ${cbuild2} found the next -- switch. See --usage for details.' " - else - return 0 - fi - build_failure -} - -# This gets a list from a remote server of the available tarballs. We use HTTP -# instead of SSH so it's more accessible to those behind nasty firewalls. -# base - already checkout out source trees -# snapshots - tarballs of various source snapshots -# prebuilt - prebuilt executables -get_list() -{ - echo "Get version list for $1..." - - # http://cbuild.validation.linaro.org/snapshots - case $1 in - testcode|t*) - testcode="`grep testcode ${local_snapshots}/testcode/md5sums | cut -d ' ' -f 3 | cut -d '/' -f 2`" - echo "${testcode}" - ;; - snapshots|s*) - snapshots="`egrep -v "\.asc|\.diff|\.txt|xdelta|base|infrastructure|testcode" ${local_snapshots}/md5sums | cut -d ' ' -f 3`" - echo "${snapshots}" - ;; - infrastructure|i*) - infrastructure="`grep infrastructure ${local_snapshots}/md5sums | cut -d ' ' -f 3 | cut -d '/' -f 2`" - echo "${infrastructure}" - ;; - esac - return 0 -} - -# Get some info on the build system -# $1 - If specified, it's the hostname of the remote system -get_build_machine_info() -{ - if test x"$1" = x; then - cpus="`getconf _NPROCESSORS_ONLN`" - libc="`getconf GNU_LIBC_VERSION`" - kernel="`uname -r`" - build_arch="`uname -p`" - hostname="`uname -n`" - distribution="`lsb_release -sc`" - else - # FIXME: this assumes the user has their ssh keys setup to the point - # where the don't need a password but is secure. - echo "Getting config info from $1" - cpus="`ssh $1 getconf _NPROCESSORS_ONLN`" - libc="`ssh $1 getconf GNU_LIBC_VERSION`" - kernel="`ssh $1 uname -r`" - build_arch="`ssh $1 uname -p`" - hostname="`ssh $1 uname -n`" - distribution="`ssh $1 lsb_release -sc`" - fi -} - -# Takes no arguments. Dumps all the important config data -dump() -{ - # These variables are always determined dynamically at run time - echo "Target is: ${target}" - echo "GCC is: ${gcc}" - echo "GCC version: ${gcc_version}" - echo "Sysroot is: ${sysroots}" - echo "C library is: ${clibrary}" - - # These variables have default values which we don't care about - echo "Binutils is: ${binutils}" - echo "Config file is: ${configfile}" - echo "Snapshot URL is: ${local_snapshots}" - echo "DB User name is: ${dbuser}" - echo "DB Password is: ${dbpasswd}" - - echo "Build # cpus is: ${cpus}" - echo "Kernel: ${kernel}" - echo "Build Arch: ${build_arch}" - echo "Hostname: ${hostname}" - echo "Distribution: ${distribution}" - - echo "Bootstrap ${bootstrap}" - echo "Gerrit ${gerrit}" - echo "Install ${install}" - echo "Source Update ${supdate}" - echo "Make Documentation ${make_docs}" - - if test x"${default_march}" != x; then - echo "Default march ${default_march}" - fi -} - -export PATH="${local_builds}/destdir/${build}/bin:$PATH" - -# do_ switches are commands that should be executed after processing all -# other switches. -do_dump= -do_checkout= -do_build= -do_build_stage=stage2 - -# Process the multiple command line arguments -while test $# -gt 0; do - # Get a URL for the source code for this toolchain component. The - # URL can be either for a source tarball, or a checkout via svn, bzr, - # or git - case "$1" in - --bu*|-bu*) # build - check_directive $1 build bu $2 - - # Save and process this after all other elements have been processed. - do_build="$2" - - # Shift off the 'all' or the package identifier. - shift - ;; - --check|-check) - runtests=yes - ;; - --checkout*|-checkout*) - check_directive $1 checkout "checkout" $2 - # Save and process this after all other elements have been processed. - do_checkout="$2" - - # Shift off the 'all' or the package identifier. - shift - ;; - --march*|-march*) - check_directive $1 march "march" $2 - default_march=$2 - shift - ;; - --host|-h*) - host=$2 - shift - ;; - --manifest*|-m*) - check_directive $1 manifest "m" $2 - # source a manifest file if there is one - if test -f $2 ; then - . $2 - fi - echo $gcc_version - ;; - # download and install the infrastructure libraries GCC depends on - --inf*|infrastructure) - infrastructure - ;; - --pr*|--prefix*) - check_directive $1 prefix "pr" $2 - prefix=$2 - shift - ;; - --sy*) # sysroot - set_sysroot ${url} - shift - ;; - --ccache|-cc*) - use_ccache=yes - ;; - --clean|-cl*) - clean_build ${url} - shift - ;; - --config) - set_config ${url} - shift - ;; - --db-user) - set_dbuser ${url} - shift - ;; - --db-passwd) - set_dbpasswd ${url} - shift - ;; - --dry*|-dry*) - dryrun=yes - ;; - --dump) - do_dump=yes - #dump ${url} - #shift - ;; - --fetch|-d) - fetch ${url} - shift - ;; - --force|-f) - force=yes - ;; - --interactive|-i) - interactive=yes - ;; - --list|-l) - get_list $2 - shift - ;; - --nodepends|-n) # nodepends - nodepends=yes - ;; - --parallel|-par*) # parallel - parallel=yes - ;; - --rel*|-rel*) - check_directive $1 release "rel" $2 - release=$2 - shift - ;; - --set*|-set*) - check_directive $1 set "set" $2 - - # Test if --target follows the --set command put --set and it's - # directive on to the back of the inputs. This is because clibrary - # validity depends on the target. - if test "`echo $@ | grep -c "\-targ.*"`" -gt 0; then - # Push $1 and $2 onto the back of the inputs for later processing. - set -- $@ $1 $2 - # Shift off them off the front. - shift 2; - continue; - fi - - set_package $2 - if test $? -gt 0; then - # The failure particular reason is output within the - # set_package function. - build_failure - fi - shift - ;; - --snap*|-snap*) - check_directive $1 snapshots snap $2 - local_snapshots=$2 - shift - ;; - --sta*|-sta*) - check_directive $1 stage sta $2 - if test x"$2" != x"2" -a x"$2" != x"1"; then - error "--stage requires a 2 or 1 directive." - build_failure - fi - do_build_stage="stage$2" - shift - ;; - --tarball*|-tarba*) - tarsrc=yes - tarbin=yes - ;; - --tarbin*|-tarbi*) - tarbin=yes - ;; - --tarsrc*|-tars*) - tarsrc=yes - ;; - --targ*|-targ*) # target - check_directive $1 target targ $2 - - target=$2 - sysroots=${sysroots}/${target} - - # Certain targets only make sense using newlib as the default - # clibrary. Override the normal default in lib/global.sh. The - # user might try to override this with --set libc={glibc|eglibc} - # or {glibc|eglibc}= but that will be caught elsewhere. - case ${target} in - arm*-eabi*|arm*-elf|aarch64*-*elf|*-mingw32) - clibrary="newlib" - ;; - *) - ;; - esac - shift - ;; - --testcode|te*) - testcode - ;; - --time*|-time*) - check_directive $1 timeout "time" $2 - if test $2 -lt 11; then - wget_timeout=$2 - else - # FIXME: Range check for non-numerical values. - wget_timeout=10 - fi - shift - ;; - # These steps are disabled by default but are sometimes useful. - --enable*|--disable*) - case "$1" in - --enable*) - check_directive $1 "enable" "enable" $2 - value="yes" - ;; - --disable*) - check_directive $1 "disable" "disable" $2 - value="no" - ;; - *) - error "Internal failure. Should never happen." - build_failure - ;; - esac - - case $2 in - bootstrap) - bootstrap="${value}" - ;; - gerrit) - gerrit="${value}" - # Initialize settings for gerrit - gerrit_info $HOME - if test x"${gerrit_branch}" != x; then - gcc_version="gcc.git~${gerrit_branch}@${gerrit_revision}" - fi - ;; - alltests) - alltests="${value}" - ;; - install) - install="${value}" - ;; - building) - building="${value}" - ;; - parallel) - parallel="$value" - ;; - schroot_test) - schroot_test="${value}" - ;; - update) - supdate="${value}" - ;; - - make_docs) - make_docs="${value}" - ;; - *) - error "$2 not recognized as a valid $1 directive." - build_failure - ;; - esac - shift - ;; - --merge*) - check_directive $1 merge merge $2 - merge_branch $2 - shift - ;; - --merge-diff*) - check_directive $1 "merge-diff" "merge-diff" $2 - merge_diff $2 - shift - ;; - --clobber) - clobber=yes - ;; - --help|-h|--h) - help - exit 0 - ;; - --usage) - echo "Usage:" - usage - echo "Run \"${cbuild2} --help\" for detailed usage information." - exit 0 - ;; - *) - if test `echo $1 | grep -c =` -gt 0; then - name="`echo $1 | cut -d '=' -f 1`" - value="`echo $1 | cut -d '=' -f 2`" - case ${name} in - b*|binutils) - binutils_version="`echo ${value}`" - ;; - gc*|gcc) - gcc_version="${value}" - ;; - gm*|gmp) - gmp_version="${value}" - ;; - gd*|gdb) - gdb_version="${value}" - ;; - mpf*|mpfr) - mpfr_version="${value}" - ;; - mpc) - mpc_version="${value}" - ;; - eglibc|glibc|newlib) - # Test if --target follows one of these clibrary set - # commands. If so, put $1 onto the back of the inputs. - # This is because clibrary validity depends on the target. - if test "`echo $@ | grep -c "\-targ.*"`" -gt 0; then - # Push $1 onto the back of the inputs for later processing. - set -- $@ $1 - # Shift it off the front. - shift - continue; - fi - - # Only allow valid combinations of target and clibrary. - crosscheck_clibrary_target ${name} ${target} - if test $? -gt 0; then - build_failure - fi - # Continue to process individually. - case ${name} in - eglibc) - clibrary="eglibc" - eglibc_version="${value}" - ;; - glibc) - clibrary="glibc" - glibc_version="${value}" - ;; - n*|newlib) - clibrary="newlib" - newlib_version="${value}" - ;; - *) - ;; - esac - ;; - *) - ;; - esac - else - error "$1: Command not recognized." - build_failure - fi - ;; - esac - if test $# -gt 0; then - shift - fi -done - -# if test x"${tarbin}" = x"yes" -o x"${tarsrc}" = x"yes"; then -# warning "No testsuite will be run when building tarballs!" -# runtests=no -# fi - -timeout_save=${wget_timeout} -wget_timeout=10 -# Get the md5sums file, which is used later to get the URL for remote files -fetch md5sums -wget_timeout=${timeout_save} - -if test ! -z ${do_dump}; then - dump -fi - -if test ! -z ${do_checkout}; then - if test x"${do_checkout}" != x"all"; then - url="`get_source ${do_checkout}`" - if test $? -gt 0; then - error "Couldn't find the source for ${do_checkout}" - build_failure - fi - - checkout ${url} - if test $? -gt 0; then - error "--checkout ${url} failed." - build_failure - fi - else - checkout_all - if test $? -gt 0; then - error "--checkout all failed." - build_failure - fi - fi -fi - -if test ! -z ${do_build}; then - if test x"${do_build}" != x"all"; then - gitinfo="`get_source ${do_build}`" - if test x"${gitinfo}" = x; then - error "Couldn't find the source for ${do_build}" - build_failure - else - build_param= - # If we're just building gcc then we need to pick a 'stage'. - # The user might have specified a stage so we use that if - # it's set. - if test `echo ${do_build} | grep -c "gcc"` -gt 0; then - build_param=${do_build_stage} - fi - build ${gitinfo}${build_param:+ ${build_param}} - if test $? -gt 0; then - error "Building ${gitinfo} failed." - build_failure - fi - fi - else - buildingall=yes - build_all - if test $? -gt 0; then - error "Build all failed." - build_failure - fi - fi -fi - -time="`expr ${SECONDS} / 60`" -if test ! -z ${do_build}; then - notice "Complete build process took ${time} minutes" -elif test ! -z ${do_checkout}; then - notice "Complete checkout process took ${time} minutes" -fi -exit 0 diff --git a/config/boards/README b/config/boards/README index c444f5c..29759ee 100644 --- a/config/boards/README +++ b/config/boards/README @@ -1,6 +1,6 @@ These are the config files DejaGnu uses to access the Linaro build farm. When the DEJAGNU environment variables is set to -cbuild2/config/linaro.exp, then cbuild2/config/boards is prefixed to +abe/config/linaro.exp, then abe/config/boards is prefixed to the directory lookup paths. The top level sub directory is the shorter nodename of the system's hostname, for example tcwgbuild01. diff --git a/config/boards/tcwglava.exp b/config/boards/tcwglava.exp index dd76abe..24773ac 100644 --- a/config/boards/tcwglava.exp +++ b/config/boards/tcwglava.exp @@ -7,4 +7,4 @@ set_board_info rcp_prog /usr/bin/scp set_board_info gcc,timeout 100000 set_board_info hostname @LAVA_BOARD@ -set_board_info lava_json /home/maxim-kuvyrkov/src/cbuild2/config/boards/lava.json +set_board_info lava_json /home/maxim-kuvyrkov/src/abe/config/boards/lava.json diff --git a/config/boards/tcwgrob/arm-odroidU2.exp b/config/boards/tcwgrob/arm-odroidU2.exp index 5b016d4..cd8f697 100644 --- a/config/boards/tcwgrob/arm-odroidU2.exp +++ b/config/boards/tcwgrob/arm-odroidU2.exp @@ -6,7 +6,7 @@ set_board_info hostname arm-odroidU2 set_board_info protocol fastssh # Enable ControlMaster and ControlPath -set_board_info rsh_opts "-o ControlMaster=auto -o ControlPath=\"/tmp/cbuild-%u@%h:[pid]\" -o ControlPersist=6h" +set_board_info rsh_opts "-o ControlMaster=auto -o ControlPath=\"/tmp/abe-%u@%h:[pid]\" -o ControlPersist=6h" #set_board_info username buildslave set_board_info gcc,timeout 100000 diff --git a/config/sources.conf b/config/sources.conf index 9d755bd..3adfaa7 100644 --- a/config/sources.conf +++ b/config/sources.conf @@ -16,7 +16,7 @@ gcc-embedded-4.6 svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_6-branch gcc-google-4.6 svn://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6 #gcc svn://gcc.gnu.org/svn/gcc/trunk gcc.git http://git.linaro.org/git/toolchain/gcc.git -cbuild2.git http://git.linaro.org/git/toolchain/cbuild2.git +abe.git http://git.linaro.org/git/toolchain/abe.git #gcc.git http://staging.git.linaro.org/git/toolchain/gcc.git #gcc-linaro-4.7 lp:gcc-linaro/4.7 diff --git a/configure b/configure index 0dda4c2..7b7d83c 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cbuild 2.0dev. +# Generated by GNU Autoconf 2.69 for abe 2.0dev. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -574,14 +574,14 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME='cbuild' -PACKAGE_TARNAME='cbuild' +PACKAGE_NAME='abe' +PACKAGE_TARNAME='abe' PACKAGE_VERSION='2.0dev' -PACKAGE_STRING='cbuild 2.0dev' +PACKAGE_STRING='abe 2.0dev' PACKAGE_BUGREPORT='' PACKAGE_URL='' -ac_unique_file="cbuild2.sh" +ac_unique_file="abe.sh" ac_subst_vars='LTLIBOBJS LIBOBJS NEWWORKDIR @@ -1255,7 +1255,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures cbuild 2.0dev to adapt to many kinds of systems. +\`configure' configures abe 2.0dev to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1303,7 +1303,7 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/cbuild] + --docdir=DIR documentation root [DATAROOTDIR/doc/abe] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] @@ -1316,7 +1316,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cbuild 2.0dev:";; + short | recursive ) echo "Configuration of abe 2.0dev:";; esac cat <<\_ACEOF @@ -1429,7 +1429,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cbuild configure 2.0dev +abe configure 2.0dev generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1568,7 +1568,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cbuild $as_me 2.0dev, which was +It was created by abe $as_me 2.0dev, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2966,7 +2966,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x"${CC}" = x -a x"${CXX}" = x; then - as_fn_error $? "You need 'gcc' and 'g++' to fully run cbuild!" "$LINENO" 5 + as_fn_error $? "You need 'gcc' and 'g++' to fully run abe!" "$LINENO" 5 missing="${missing} gcc" fi ac_aux_dir= @@ -3158,8 +3158,8 @@ fi if test x"${WGET}" = x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'wget' to fully run cbuild!" >&5 -$as_echo "$as_me: WARNING: You need 'wget' to fully run cbuild!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You need 'wget' to fully run abe!" >&5 +$as_echo "$as_me: WARNING: You need 'wget' to fully run abe!" >&2;} missing="${missing} wget" fi @@ -4762,7 +4762,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cbuild $as_me 2.0dev, which was +This file was extended by abe $as_me 2.0dev, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4815,7 +4815,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cbuild config.status 2.0dev +abe config.status 2.0dev configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index dff00fe..df90bce 100644 --- a/configure.ac +++ b/configure.ac @@ -21,8 +21,8 @@ dnl build and test a GNU toolchain. dnl AC_PREREQ(2.59c) -AC_INIT(cbuild, 2.0dev) -AC_CONFIG_SRCDIR([cbuild2.sh]) +AC_INIT(abe, 2.0dev) +AC_CONFIG_SRCDIR([abe.sh]) dnl AC_CONFIG_HEADERS([config.h]) dnl AC_CONFIG_MACRO_DIR([macros]) @@ -33,7 +33,7 @@ missing= AC_PROG_CC AC_PROG_CXX if test x"${CC}" = x -a x"${CXX}" = x; then - AC_MSG_ERROR([You need 'gcc' and 'g++' to fully run cbuild!]) + AC_MSG_ERROR([You need 'gcc' and 'g++' to fully run abe!]) missing="${missing} gcc" fi AC_PROG_INSTALL @@ -68,7 +68,7 @@ AC_SUBST(DISTRIBUTION) AC_PATH_PROG(WGET, wget) AC_SUBST(WGET) if test x"${WGET}" = x; then - AC_MSG_WARN([You need 'wget' to fully run cbuild!]) + AC_MSG_WARN([You need 'wget' to fully run abe!]) missing="${missing} wget" fi @@ -205,7 +205,7 @@ BUILDDATE="`date +%Y%m%d`" AC_SUBST(BUILDDATE) dnl While it's a bad idea to store the database access information in an unencrypted -dnl text file, this is useful for cbuild2 development itself. This option should never +dnl text file, this is useful for abe development itself. This option should never dnl be used in a production environment. The default is read-only access. You can also dnl set DBUSER and DBPASSWD in your environment, but that's also a possible security dnl risk. @@ -224,7 +224,7 @@ AC_ARG_WITH(dbhost, dbhost=${withval} ; AC_MSG_WARN([The database hostname is stored in an unencrypted text file which could be considered a security risk!]), dbhost='localhost') -dnl The top of the cbuild tree +dnl The top of the abe tree AC_ARG_WITH(toplevel, AC_HELP_STRING([--with-toplevel], []), CBUILD_TOP=${withval}, @@ -253,7 +253,7 @@ AC_SUBST(SOURCES_CONF) CBUILD_PATH=$(readlink -f ${srcdir}) AC_SUBST(CBUILD_PATH) -dnl The top of the cbuild tree +dnl The top of the abe tree AC_ARG_WITH(sysroot, AC_HELP_STRING([--with-sysroot], []), SYSROOTS=${withval}, @@ -394,7 +394,7 @@ AC_SUBST(ENABLE_PARALLEL) dnl AC_ARG_WITH(snapshots, dnl AC_HELP_STRING([--with-snapshots], []), dnl snapshots=${withval}, -dnl snapshots='cbuild') +dnl snapshots='abe') dnl Since the configure script is actually checked in, a developer dnl does not need to have the GNU Autotools installed. However, diff --git a/host.conf.in b/host.conf.in index a04255a..d920947 100644 --- a/host.conf.in +++ b/host.conf.in @@ -7,8 +7,8 @@ dbhost=@DBPASSWD@ local_snapshots=@LOCAL_SNAPSHOTS@ git_reference_dir=@GIT_REFERENCE_DIR@ remote_snapshots=@REMOTE_SNAPSHOTS@ -cbuild_top=@CBUILD_TOP@ -cbuild_path=@CBUILD_PATH@ +abe_top=@CBUILD_TOP@ +abe_path=@CBUILD_PATH@ sources_conf=@SOURCES_CONF@ diff --git a/jenkins.sh b/jenkins.sh index 57cc203..aa1518c 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -21,7 +21,7 @@ usage() { # Format this section with 75 columns. cat << EOF - jenkins.sh [--help] [-s snapshot dir] [g git reference dir] [cbuildv2 path] [w workspace] + jenkins.sh [--help] [-s snapshot dir] [g git reference dir] [abe path] [w workspace] EOF return 0 } @@ -54,16 +54,16 @@ user_snapshots="${user_workspace}/snapshots" # The release version string, usually a date releasestr= -# This is a string of optional extra arguments to pass to cbuild at runtime +# This is a string of optional extra arguments to pass to abe at runtime user_options="" -OPTS="`getopt -o s:g:c:w:o:f:t:h -l snapshots:gitrepo:cbuild:workspace:options:fileserver:target:help -- "$@"`" +OPTS="`getopt -o s:g:c:w:o:f:t:h -l snapshots:gitrepo:abe:workspace:options:fileserver:target:help -- "$@"`" while test $# -gt 0; do echo 1 = "$1" case $1 in -s|--snapshots) user_snapshots=$2 ;; -g|--gitrepo) user_git_repo=$2 ;; - -c|--cbuild) cbuild_dir=$2 ;; + -c|--abe) abe_dir=$2 ;; -t|--target) target=$2 ;; -w|--workspace) user_workspace=$2 ;; -o|--options) user_options=$2 ;; @@ -169,18 +169,18 @@ if test x"${debug}" = x"true"; then export CONFIG_SHELL="/bin/bash -x" fi -if test x"${cbuild_dir}" = x; then - cbuild_dir=${topdir} +if test x"${abe_dir}" = x; then + abe_dir=${topdir} fi -$CONFIG_SHELL ${cbuild_dir}/configure --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${shared}/snapshots --with-fileserver=${fileserver} +$CONFIG_SHELL ${abe_dir}/configure --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${shared}/snapshots --with-fileserver=${fileserver} # load commonly used varibles set by configure if test -e "${PWD}/host.conf"; then . "${PWD}/host.conf" fi -# This is the top level directory for the cbuild2 sources. -#cbuild_dir="${cbuild_path}" +# This is the top level directory for the abe sources. +#abe_dir="${abe_path}" # Delete the previous test result files to avoid problems. find ${user_workspace} -name \*.sum -exec rm {} \; 2>&1 > /dev/null @@ -189,14 +189,14 @@ find ${user_workspace} -name \*.sum -exec rm {} \; 2>&1 > /dev/null # that to compile the cross compiler to bootstrap. Since it's just # used to build the cross compiler, we don't bother to run 'make check'. if test x"${bootstrap}" = xtrue; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --parallel ${change} --bootstrap --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --parallel ${change} --bootstrap --build all fi # Now we build the cross compiler, for a native compiler this becomes # the stage2 bootstrap build. -$CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --parallel ${check} ${tars} ${releasestr} ${platform} ${change} --timeout 100 --build all +$CONFIG_SHELL ${abe_dir}/abe.sh --parallel ${check} ${tars} ${releasestr} ${platform} ${change} --timeout 100 --build all -# If cbuild2 returned an error, make jenkins see this as a build failure +# If abe returned an error, make jenkins see this as a build failure if test $? -gt 0; then exit 1 fi @@ -290,7 +290,7 @@ if test x"${runtests}" = xtrue; then #if test x"${sums}" != x; then # for i in ${sums}; do # name="`basename $i`" -# ${cbuild_dir}/sum2junit.sh $i $user_workspace/${name}.junit +# ${abe_dir}/sum2junit.sh $i $user_workspace/${name}.junit # cp $i ${user_workspace}/results/${dir} # done # junits="`find ${user_workspace} -name *.junit`" @@ -309,13 +309,13 @@ sums="`find ${user_workspace} -name *.sum`" # Canadian Crosses are a win32 hosted cross toolchain built on a Linux # machine. if test x"${canadian}" = x"true"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --nodepends --parallel ${change} ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --nodepends --parallel ${change} ${platform} --build all distro="`lsb_release -sc`" # Ubuntu Lucid uses an older version of Mingw32 if test x"${distro}" = x"lucid"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --nodepends --parallel ${change} ${tars} --host=i586-mingw32msvc ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --nodepends --parallel ${change} ${tars} --host=i586-mingw32msvc ${platform} --build all else - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --nodepends --parallel ${change} ${tars} --host=i686-w64-mingw32 ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --nodepends --parallel ${change} ${tars} --host=i686-w64-mingw32 ${platform} --build all fi fi @@ -336,7 +336,7 @@ if test x"${sums}" != x -o x"${runtests}" != x"true"; then logs="`find ${user_workspace} -name make\*.log`" scp ${logs} ${fileserver}:${basedir}/${dir}/ ssh ${fileserver} xz ${basedir}/${dir}/\*.sum ${basedir}/${dir}/\*.log - scp ${cbuild_dir}/tcwgweb.sh ${fileserver}:/tmp/tcwgweb$$.sh + scp ${abe_dir}/tcwgweb.sh ${fileserver}:/tmp/tcwgweb$$.sh ssh ${fileserver} /tmp/tcwgweb$$.sh --email --base ${basedir}/${dir} ssh ${fileserver} rm -f /tmp/tcwgweb$$.sh @@ -345,7 +345,7 @@ if test x"${sums}" != x -o x"${runtests}" != x"true"; then if test x"${tarsrc}" = xtrue -a x"${release}" != x; then allfiles="`ls ${shared}/snapshots/*${release}*.xz`" srcfiles="`echo ${allfiles} | egrep -v "arm|aarch"`" - scp ${srcfiles} ${fileserver}:/home/cbuild/var/snapshots/ + scp ${srcfiles} ${fileserver}:/home/abe/var/snapshots/ rm -f ${srcfiles} fi diff --git a/lib/checkout.sh b/lib/checkout.sh index 9c10584..907520a 100644 --- a/lib/checkout.sh +++ b/lib/checkout.sh @@ -24,7 +24,7 @@ # but we also want to work with the native source code control system. usegit=no -# This is used by cbuild2.sh --checkout all but not by --build +# This is used by abe.sh --checkout all but not by --build checkout_infrastructure() { trace "$*" @@ -298,7 +298,7 @@ checkout() # dryrun "(cd ${srcdir} && git checkout ${branch})" elif test x"${supdate}" = xyes; then # Some packages allow the build to modify the source directory and - # that might screw up cbuild2's state so we restore a pristine branch. + # that might screw up abe's state so we restore a pristine branch. notice "Updating sources for ${tool} in ${srcdir}" dryrun "(cd ${repodir} && git stash --all)" dryrun "(cd ${repodir} && git reset --hard)" diff --git a/lib/common.sh b/lib/common.sh index 5adc94e..e23f3ec 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -56,7 +56,7 @@ set_dbpasswd() dbpasswd="$1" } -# if --dryrun is passed to cbuild2.sh, then commands are echoed instead of +# if --dryrun is passed to abe.sh, then commands are echoed instead of # of executed. dryrun() { diff --git a/lib/diff.sh b/lib/diff.sh index 9465736..8b1276c 100644 --- a/lib/diff.sh +++ b/lib/diff.sh @@ -32,8 +32,8 @@ difftwodirs () echo "Diffing: ${prev} against ${next}..." local resultsdir="${local_builds}/test-results" - local pversion="`echo ${prev} | grep -o "test-results/cbuild[0-9a-z]*" | grep -o "cbuild[0-9a-z]*"`" - local nversion="`echo ${next} | grep -o "test-results/cbuild[0-9a-z]*" | grep -o "cbuild[0-9a-z]*"`" + local pversion="`echo ${prev} | grep -o "test-results/abe[0-9a-z]*" | grep -o "abe[0-9a-z]*"`" + local nversion="`echo ${next} | grep -o "test-results/abe[0-9a-z]*" | grep -o "abe[0-9a-z]*"`" diffdir="${resultsdir}/diffof-${pversion}-${nversion}" mkdir -p ${diffdir} @@ -111,9 +111,9 @@ diffall () # This produces the test file, who's header needs to look like this: # # Difference in testsuite results between: -# gcc-linaro-4.8-2014.01 build i686-precise-cbuild461-oort8-i686r1 +# gcc-linaro-4.8-2014.01 build i686-precise-abe461-oort8-i686r1 # and the one before it: -# gcc-linaro-4.8-2013.12 build i686-precise-cbuild461-oort2-i686r1 +# gcc-linaro-4.8-2013.12 build i686-precise-abe461-oort2-i686r1 # ------ testfile() diff --git a/lib/gerrit.sh b/lib/gerrit.sh index 410aaaa..8061ced 100644 --- a/lib/gerrit.sh +++ b/lib/gerrit.sh @@ -25,7 +25,7 @@ # ssh -p 29418 robert.savoye@git.linaro.org gerrit version # this uses the git commit SHA-1 # ssh -p 29418 robert.savoye@git.linaro.org gerrit review --code-review 0 -m "foo" a87c53e83236364fe9bc7d5ffdbf3c307c64707d - # ssh -p 29418 robert.savoye@git.linaro.org gerrit review --project toolchain/cbuild2 --code-review 0 -m "foobar" a87c53e83236364fe9bc7d5ffdbf3c307c64707d + # ssh -p 29418 robert.savoye@git.linaro.org gerrit review --project toolchain/abe --code-review 0 -m "foobar" a87c53e83236364fe9bc7d5ffdbf3c307c64707d # ssh -p 29418 robert.savoye@git.linaro.org gerrit query --current-patch-set gcc status:open limit:1 --format JSON # The number used for code reviews looks like this, it's passed as a string to @@ -37,7 +37,7 @@ # +2 Looks good to me, approved -# ssh -p 29418 robert.savoye@git.linaro.org gerrit review --project toolchain/cbuild2 --code-review "+2" -m "foobar" 55957eaff3d80d854062544dea6fc0eedcbf9247 --submit +# ssh -p 29418 robert.savoye@git.linaro.org gerrit review --project toolchain/abe --code-review "+2" -m "foobar" 55957eaff3d80d854062544dea6fc0eedcbf9247 --submit # local revision="@`cd ${srcdir} && git log --oneline | head -1 | cut -d ' ' -f 1`" @@ -215,7 +215,7 @@ Your patch is being reviewed. The build step has completed with a status of: ${s EOF -#http://cbuild.validation.linaro.org/logs/gcc-linaro-5.0.0/ +#http://abe.validation.linaro.org/logs/gcc-linaro-5.0.0/ add_gerrit_comment ${revision} ${msgfile} ${code} if test $? -gt 0; then diff --git a/lib/git-parser.sh b/lib/git-parser.sh index 5474af6..07ee400 100644 --- a/lib/git-parser.sh +++ b/lib/git-parser.sh @@ -64,7 +64,7 @@ # The revision designation that follows the repository, e.g., # binutils.git@12345 # -# Note: cbuild allows .git/branch@revision even though +# Note: abe allows .git/branch@revision even though # when a revision is present, the 'branch' is only used # in path names, since a revision implies a branch already. # diff --git a/lib/globals.sh b/lib/globals.sh index d50bdb6..4b156db 100644 --- a/lib/globals.sh +++ b/lib/globals.sh @@ -115,7 +115,7 @@ jenkins_job_url="" # source a user specific config file for commonly used configure options. # These overide any of the above values. -if test -e ~/.cbuildrc; then - . ~/.cbuildrc +if test -e ~/.aberc; then + . ~/.aberc fi diff --git a/lib/make.sh b/lib/make.sh index 4dc16dc..69ffc14 100755 --- a/lib/make.sh +++ b/lib/make.sh @@ -107,7 +107,7 @@ build_all() local sysroot="`${target}-gcc -print-sysroot`" if test ! -d ${sysroot}; then dryrun "mkdir -p /opt/linaro" - dryrun "ln -sfnT ${cbuild_top}/sysroots/${target} ${sysroot}" + dryrun "ln -sfnT ${abe_top}/sysroots/${target} ${sysroot}" fi fi ;; diff --git a/lib/merge.sh b/lib/merge.sh index 83fadc9..f57625c 100644 --- a/lib/merge.sh +++ b/lib/merge.sh @@ -85,7 +85,7 @@ merge_branch() month="`date +%m`" day="`date +%d`" - # If no email address is in ~/.cbuildrc, create one + # If no email address is in ~/.aberc, create one if test x"${email}" = x; then email="${LOGNAME}@`hostname`" fi diff --git a/lib/package.sh b/lib/package.sh index df111b9..0f08ffc 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -279,10 +279,10 @@ binary_sysroot() local tag="sysroot-linaro-${clibrary}-gcc${version}-${release}-${target}" fi -# dryrun "cp -fr ${cbuild_top}/sysroots/${target} ${destdir}" +# dryrun "cp -fr ${abe_top}/sysroots/${target} ${destdir}" local destdir="/tmp/linaro.$$/${tag}" dryrun "mkdir -p /tmp/linaro.$$" - dryrun "ln -sfnT ${cbuild_top}/sysroots/${target} ${destdir}" + dryrun "ln -sfnT ${abe_top}/sysroots/${target} ${destdir}" # Generate the install script sysroot_install_script ${destdir} @@ -347,7 +347,7 @@ manifest() local srcdir="`get_srcdir ${binutils_version}`" local binutils_revision=="`get_git_revision ${srcdir}`" - local cbuild_revision="`get_git_revision ${cbuild_path}`" + local abe_revision="`get_git_revision ${abe_path}`" rm -f ${outfile} cat >> ${outfile} < host.txt #fetch md5sums diff --git a/scripts/Backport.job b/scripts/Backport.job index 645ff24..a1c7601 100755 --- a/scripts/Backport.job +++ b/scripts/Backport.job @@ -1,6 +1,6 @@ #!/bin/bash -cbuild_dir="${WORKSPACE}/cbuildv2" +abe_dir="${WORKSPACE}/abe" user_snapshots="${WORKSPACE}/snapshots" shared="/home/buildslave/workspace/shared/" snapshots_ref="${shared}/snapshots" @@ -17,11 +17,11 @@ rm -fr ${WORKSPACE} mkdir -p ${WORKSPACE}/_build cd ${WORKSPACE}/_build -$CONFIG_SHELL ${cbuild_dir}/configure --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${snapshots_ref} --with-fileserver=148.251.136.42 +$CONFIG_SHELL ${abe_dir}/configure --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${snapshots_ref} --with-fileserver=148.251.136.42 -$CONFIG_SHELL -x ${cbuild_dir}/test-backport.sh --fileserver=148.251.136.42 --target ${target} ${gcc_branch} +$CONFIG_SHELL -x ${abe_dir}/test-backport.sh --fileserver=148.251.136.42 --target ${target} ${gcc_branch} -# force a failure of cbuild2 has build problems. +# force a failure of abe has build problems. if test $? -gt 0; then exit 1 fi diff --git a/scripts/BuildFarm.job b/scripts/BuildFarm.job index 95d103f..bf5a502 100755 --- a/scripts/BuildFarm.job +++ b/scripts/BuildFarm.job @@ -11,7 +11,7 @@ export runtests=true export CONFIG_SHELL="/bin/bash" shared="/home/buildslave/workspace/shared/" -cbuild_dir="${WORKSPACE}/cbuildv2" +abe_dir="${WORKSPACE}/abe" user_snapshots="${WORKSPACE}/snapshots" snapshots_ref="${shared}/snapshots" @@ -19,10 +19,10 @@ rm -fr ${WORKSPACE}/_build mkdir -p ${WORKSPACE}/_build cd ${WORKSPACE}/_build -$CONFIG_SHELL ${cbuild_dir}/configure --disable update --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${shared}/snapshots -$CONFIG_SHELL -x ${cbuild_dir}/jenkins.sh ${release} +$CONFIG_SHELL ${abe_dir}/configure --disable update --with-local-snapshots=${user_snapshots} --with-git-reference-dir=${shared}/snapshots +$CONFIG_SHELL -x ${abe_dir}/jenkins.sh ${release} -# force a failure of cbuild2 has build problems. +# force a failure of abe has build problems. if test $? -gt 0; then exit 1 fi diff --git a/scripts/MakeRelease.job b/scripts/MakeRelease.job index 915c42b..0e8b5d1 100755 --- a/scripts/MakeRelease.job +++ b/scripts/MakeRelease.job @@ -31,7 +31,7 @@ if test x"${target}" != x"native" -a x"${target}" != x; then fi shared="/home/buildslave/workspace/shared/" -cbuild_dir="${user_workspace}/cbuildv2" +abe_dir="${user_workspace}/abe" user_snapshots="${user_workspace}/snapshots" if test -e ${user_workspace}; then @@ -54,7 +54,7 @@ fi cd ${user_workspace}/_build if ! test -e host.conf; then - $CONFIG_SHELL ${cbuild_dir}/configure --with-local-snapshots=${user_snapshots} \ + $CONFIG_SHELL ${abe_dir}/configure --with-local-snapshots=${user_snapshots} \ --with-git-reference-dir=${shared}/snapshots --with-fileserver=${fileserver} fi @@ -68,7 +68,7 @@ fi # Build a toolchain, run the tests, and the create a source release as a tarball if test x"${tarsrc}" = x"yes"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --disable update --release ${release} \ + $CONFIG_SHELL ${abe_dir}/abe.sh --disable update --release ${release} \ --tarsrc ${check} gcc=${gcc_source} ${platform} -build all fi @@ -76,15 +76,15 @@ fi if test x"${tarbin}" = x"yes"; then # Canadian cross builds require a Linux hosted crfoss compiler first if test x"${canadian}" = x"true"; then - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --disable update --release ${release} ${check} gcc=${gcc_source} ${platform} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --disable update --release ${release} ${check} gcc=${gcc_source} ${platform} --build all host="--host i686-w64-mingw32" else host="" fi - $CONFIG_SHELL ${cbuild_dir}/cbuild2.sh --disable update --release ${release} --tarbin ${check} gcc=${gcc_source} ${platform} ${host} --build all + $CONFIG_SHELL ${abe_dir}/abe.sh --disable update --release ${release} --tarbin ${check} gcc=${gcc_source} ${platform} ${host} --build all fi -# force a failure if cbuild2 has build problems. +# force a failure if abe has build problems. if test $? -gt 0; then exit 1 fi @@ -95,8 +95,8 @@ if test x"${nocheck}" = xyes; then fi # Copy the source build test results and tarballs to the fileserver -bases="/work/cbuildv2/baselines/${release}/${target}" -snaps="/home/cbuild/var/snapshots/" +bases="/work/abe/baselines/${release}/${target}" +snaps="/home/abe/var/snapshots/" if test x"${tarsrc}" = x"yes"; then manifest="`find ${user_workspace} -name manifest.txt`" scp ${manifest} ${fileserver}:${bases}/ @@ -144,7 +144,7 @@ if test x"${tarbin}" = xyes; then fi # Diff the two directories - scp ${cbuild_dir}/tcwgweb.sh ${fileserver}:/tmp/tcwgweb$$.sh + scp ${abe_dir}/tcwgweb.sh ${fileserver}:/tmp/tcwgweb$$.sh out="`ssh ${fileserver} "if test -e ${bases}; then echo YES; else echo NO; fi"`" if test x"${out}" = x"YES"; then out="`ssh ${fileserver} /tmp/tcwgweb$$.sh --email --tdir ${bases} ${binaries}; fi`" diff --git a/tcwgweb.sh b/tcwgweb.sh index 41fa19c..6f4eca3 100755 --- a/tcwgweb.sh +++ b/tcwgweb.sh @@ -22,9 +22,9 @@ if test -e "${PWD}/host.conf"; then fi # load commonly used functions -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" +abe="`which $0`" +topdir="${abe_path}" +abe="`basename $0`" . "${topdir}/lib/common.sh" || exit 1 @@ -86,7 +86,7 @@ diffbaseline () { source $1/manifest.txt - local baselines="/work/cbuildv2/baselines" + local baselines="/work/abe/baselines" local tool="`echo $2 | cut -d '-' -f 1`" local tool="`basename ${tool}`" local version="`echo $2 | grep -o "[0-9]\.[0-9]*" | head -1`" @@ -258,9 +258,9 @@ diffall () # This produces the test file, who's header needs to look like this: # # Difference in testsuite results between: -# gcc-linaro-4.8-2014.01 build i686-precise-cbuild461-oort8-i686r1 +# gcc-linaro-4.8-2014.01 build i686-precise-abe461-oort8-i686r1 # and the one before it: -# gcc-linaro-4.8-2013.12 build i686-precise-cbuild461-oort2-i686r1 +# gcc-linaro-4.8-2013.12 build i686-precise-abe461-oort2-i686r1 # ------ testfile() diff --git a/test-backport.sh b/test-backport.sh index 4dadb36..46527c9 100755 --- a/test-backport.sh +++ b/test-backport.sh @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# To run, this script takes arguments in the same format as cbuild2.sh. The two +# To run, this script takes arguments in the same format as abe.sh. The two # arguments it needs is the target archicture to build, and the gcc backport # branch name. Example: # $PATH/test-backport.sh --target arm-linux-gnueabihf gcc.git~4.9-backport-209419 @@ -41,9 +41,9 @@ if test -e "${PWD}/host.conf"; then else echo "Error: this script needs to be run from a configured Cbuild2 tree!" 1>&2 fi -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" +abe="`which $0`" +topdir="${abe_path}" +abe="`basename $0`" repo="gcc.git" fileserver="" @@ -86,10 +86,10 @@ declare -a revisions=(`cd ${srcdir} && git log -n 2 | grep ^commit | cut -d ' ' # Force GCC to not build the docs export BUILD_INFO="" -resultsdir="/tmp/cbuild-${target}@" +resultsdir="/tmp/abe-${target}@" i=0 while test $i -lt ${#revisions[@]}; do - bash -x ${topdir}/cbuild2.sh --disable update --check --target ${target} gcc=gcc.git@${revisions[$i]} --build all --disable make_docs + bash -x ${topdir}/abe.sh --disable update --check --target ${target} gcc=gcc.git@${revisions[$i]} --build all --disable make_docs if test $? -gt 0; then echo "ERROR: Cbuild2 failed!" exit 1 diff --git a/test.sh b/test.sh index e1d5f97..818a723 100755 --- a/test.sh +++ b/test.sh @@ -1,22 +1,22 @@ #!/bin/bash -testcbuild2="`basename $0`" +testabe="`basename $0`" topdir=`dirname $0` -cbuild_path=`readlink -f ${topdir}` -export cbuild_path +abe_path=`readlink -f ${topdir}` +export abe_path # Source common.sh for some common utilities. -. ${cbuild_path}/lib/common.sh || exit 1 +. ${abe_path}/lib/common.sh || exit 1 # We use a tmp/ directory for the builddir in order that we don't pollute the # srcdir or an existing builddir. -tmpdir=`mktemp -d /tmp/cbuild2.$$.XXX` +tmpdir=`mktemp -d /tmp/abe.$$.XXX` if test "$?" -gt 0; then error "mktemp of ${tmpdir} failed." exit 1 fi -# Log files for cbuild test runs are dumped here. +# Log files for abe test runs are dumped here. testlogs=${tmpdir}/testlogs mkdir -p ${testlogs} if test "$?" -gt 0; then @@ -29,14 +29,14 @@ runintmpdir= # existing build dir, otherwise we're in the srcdir so we need to run # configure in the tmpdir and run the tests from there. if test ! -e "${PWD}/host.conf"; then - (cd ${tmpdir} && ${cbuild_path}/configure --with-sources-conf=${cbuild_path}/testsuite/test_sources.conf) + (cd ${tmpdir} && ${abe_path}/configure --with-sources-conf=${abe_path}/testsuite/test_sources.conf) runintmpdir=yes else # copy the md5sums file from the existing snapshots directory to the new local_snapshots directory. # Override $local_snapshots so that the local_snapshots directory of an # existing build is not moved or damaged. This affects all called - # instances of cbuild2.sh below. + # instances of abe.sh below. export local_snapshots="${tmpdir}/snapshots" out="`mkdir -p ${local_snapshots}`" if test "$?" -gt 0; then @@ -44,19 +44,19 @@ else exit 1 fi # Override the existing sources_conf setting in host.conf. - export sources_conf=${cbuild_path}testsuite/test_sources.conf + export sources_conf=${abe_path}testsuite/test_sources.conf fi export wget_quiet=yes usage() { - echo " ${testcbuild2} [--debug|-v]" + echo " ${testabe} [--debug|-v]" echo " [--md5sums ]" echo "" - echo " ${testcbuild2} is the cbuild2 frontend command conformance test." + echo " ${testabe} is the abe frontend command conformance test." echo "" - echo " ${testcbuild2} should be run from the source directory." + echo " ${testabe} should be run from the source directory." } passes=0 @@ -157,7 +157,7 @@ test_failure() local match=$2 local out= - out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep "${match}" | sed -e 's:\(^ERROR\).*\('"${match}"'\).*:\1 \2:')`" + out="`(${runintmpdir:+cd ${tmpdir}} && ${abe_path}/abe.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep "${match}" | sed -e 's:\(^ERROR\).*\('"${match}"'\).*:\1 \2:')`" cbtest ${testlineno} "${out}" "ERROR ${match}" "ERROR ${cb_commands}" } @@ -169,7 +169,7 @@ test_pass() local out= # Continue to search for error so we don't get false positives. - out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep "${match}" | sed -e 's:\(^ERROR\).*\('"${match}"'\).*:\1 \2:')`" + out="`(${runintmpdir:+cd ${tmpdir}} && ${abe_path}/abe.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep "${match}" | sed -e 's:\(^ERROR\).*\('"${match}"'\).*:\1 \2:')`" cbtest ${testlineno} "${out}" "${match}" "VALID ${cb_commands}" } @@ -607,7 +607,7 @@ test_pass "${cb_commands}" "${match}" # be grepped in 'match'... yet. cb_commands="--dryrun --build gcc.git --stage 2" testlineno="`expr $LINENO + 1`" -out="`(${runintmpdir:+cd ${tmpdir}} && ${cbuild_path}/cbuild2.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep -c " build.*gcc.*stage2")`" +out="`(${runintmpdir:+cd ${tmpdir}} && ${abe_path}/abe.sh ${cb_commands} 2>&1 | tee ${testlogs}/${testlineno}.log | grep -c " build.*gcc.*stage2")`" if test ${out} -gt 0; then pass ${testlineno} "VALID: --dryrun --build gcc.git --stage 2" else @@ -630,7 +630,7 @@ if test x"${tmpdir}" = x"/tmp"; then echo "\n${local_snapshots} doesn't conform to /tmp//snapshots. Not safe to remove." elif test -d "${tmpdir}/snapshots" -a ${failures} -lt 1; then echo "" - echo "${testcbuild2} finished with no unexpected failures. Removing ${tmpdir}" + echo "${testabe} finished with no unexpected failures. Removing ${tmpdir}" rm -rf ${tmpdir} fi diff --git a/testsuite/gerrit-tests.sh b/testsuite/gerrit-tests.sh index c860e31..8df440a 100755 --- a/testsuite/gerrit-tests.sh +++ b/testsuite/gerrit-tests.sh @@ -7,7 +7,7 @@ cat < ${review} [gerrit] host=review.linaro.org port=29418 - project=toolchain/cbuild2 + project=toolchain/abe [gitreview] username=buildslave @@ -32,7 +32,7 @@ else fi out="`extract_gerrit_project ${srcdir}`" -if test x"${out}" = x"toolchain/cbuild2"; then +if test x"${out}" = x"toolchain/abe"; then pass extract_gerrit_project"" else ${fail_state} "extract_gerrit_project" diff --git a/testsuite/git-parser-tests.sh b/testsuite/git-parser-tests.sh index 70d5f63..b72bbe5 100644 --- a/testsuite/git-parser-tests.sh +++ b/testsuite/git-parser-tests.sh @@ -1000,7 +1000,7 @@ match='linux' test_parser tool "${in}" "${match}" "${errmatch}" errmatch=0 -in="http://cbuild.validation.linaro.org/snapshots/gdb-7.6~20121001+git3e2e76a.tar" +in="http://abe.validation.linaro.org/snapshots/gdb-7.6~20121001+git3e2e76a.tar" match='gdb' test_parser repo "${in}" "${match}" "${errmatch}" diff --git a/testsuite/normalize-tests.sh b/testsuite/normalize-tests.sh index e15fba1..37df311 100644 --- a/testsuite/normalize-tests.sh +++ b/testsuite/normalize-tests.sh @@ -81,7 +81,7 @@ else fixme "${in} returned ${out}" fi -in="http://cbuild.validation.linaro.org/snapshots/gcc-linaro-4.8-2013.06-1.tar.xz" +in="http://abe.validation.linaro.org/snapshots/gcc-linaro-4.8-2013.06-1.tar.xz" out="`normalize_path ${in}`" if test x"${out}" = x"gcc-linaro-4.8-2013.06-1"; then pass "normalize_path: tarball compressed" diff --git a/testsuite/srcdir-tests.sh b/testsuite/srcdir-tests.sh index 53c1e34..3a9c09a 100644 --- a/testsuite/srcdir-tests.sh +++ b/testsuite/srcdir-tests.sh @@ -100,11 +100,11 @@ fi echo "============= additional get_srcdir () tests ================" # Some of these are redundant with those in srcdir_tests but since -# already have cbuild2.git checked out we might as well test them here. +# already have abe.git checked out we might as well test them here. testing="get_srcdir: .git" -in="cbuild2.git" +in="abe.git" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git"; then +if test x"${out}" = x"${local_snapshots}/abe.git"; then pass "${testing}" else fail "${testing}" @@ -112,9 +112,9 @@ else fi testing="get_srcdir: .git@" -in="cbuild2.git@12345" +in="abe.git@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git@12345"; then +if test x"${out}" = x"${local_snapshots}/abe.git@12345"; then pass "${testing}" else fail "${testing}" @@ -122,9 +122,9 @@ else fi testing="get_srcdir: .git/" -in="cbuild2.git/branch" +in="abe.git/branch" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~branch"; then +if test x"${out}" = x"${local_snapshots}/abe.git~branch"; then pass "${testing}" else fail "${testing}" @@ -132,9 +132,9 @@ else fi testing="get_srcdir: .git/@" -in="cbuild2.git/branch@12345" +in="abe.git/branch@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~branch@12345"; then +if test x"${out}" = x"${local_snapshots}/abe.git~branch@12345"; then pass "${testing}" else fail "${testing}" @@ -142,9 +142,9 @@ else fi testing="get_srcdir: .git~@" -in="cbuild2.git~branch@12345" +in="abe.git~branch@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~branch@12345"; then +if test x"${out}" = x"${local_snapshots}/abe.git~branch@12345"; then pass "${testing}" else fail "${testing}" @@ -152,9 +152,9 @@ else fi testing="get_srcdir: .git/@" -in="cbuild2.git/multi/part/branch@12345" +in="abe.git/multi/part/branch@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~multi-part-branch@12345"; then +if test x"${out}" = x"${local_snapshots}/abe.git~multi-part-branch@12345"; then pass "${testing}" else fail "${testing}" @@ -162,9 +162,9 @@ else fi testing="get_srcdir: .git~@" -in="cbuild2.git~multi/part/branch@12345" +in="abe.git~multi/part/branch@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~multi-part-branch@12345"; then +if test x"${out}" = x"${local_snapshots}/abe.git~multi-part-branch@12345"; then pass "${testing}" else fail "${testing}" @@ -174,7 +174,7 @@ fi # testing="get_srcdir: invalid identifier shouldn't return anything." -in="cbuild2~multi/part/branch@12345" +in="abe~multi/part/branch@12345" out="`get_srcdir $in 2>/dev/null`" if test x"${out}" = x""; then pass "${testing}" @@ -184,9 +184,9 @@ else fi testing="get_srcdir: ~@" -in="git://git.linaro.org/people/rsavoye/cbuild2~multi/part/branch@12345" +in="git://git.linaro.org/people/rsavoye/abe~multi/part/branch@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2~multi-part-branch@12345"; then +if test x"${out}" = x"${local_snapshots}/abe~multi-part-branch@12345"; then pass "${testing}" else fail "${testing}" @@ -194,9 +194,9 @@ else fi testing="get_srcdir: .git~@" -in="cbuild2.git~multi/part/branch@12345" +in="abe.git~multi/part/branch@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git~multi-part-branch@12345"; then +if test x"${out}" = x"${local_snapshots}/abe.git~multi-part-branch@12345"; then pass "${testing}" else fail "${testing}" @@ -204,9 +204,9 @@ else fi testing="get_srcdir: http://@/.git" -in="http://git@staging.git.linaro.org/git/toolchain/cbuild2.git" +in="http://git@staging.git.linaro.org/git/toolchain/abe.git" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git"; then +if test x"${out}" = x"${local_snapshots}/abe.git"; then pass "${testing}" else fail "${testing}" @@ -214,9 +214,9 @@ else fi testing="get_srcdir: http://@/.git@" -in="http://git@staging.git.linaro.org/git/toolchain/cbuild2.git@12345" +in="http://git@staging.git.linaro.org/git/toolchain/abe.git@12345" out="`get_srcdir $in`" -if test x"${out}" = x"${local_snapshots}/cbuild2.git@12345"; then +if test x"${out}" = x"${local_snapshots}/abe.git@12345"; then pass "${testing}" else fail "${testing}" diff --git a/testsuite/test.sh b/testsuite/test.sh index 6ea126c..f41efe3 100755 --- a/testsuite/test.sh +++ b/testsuite/test.sh @@ -2,7 +2,7 @@ # common.sh loads all the files of library functions. if test x"`echo \`dirname "$0"\` | sed 's:^\./::'`" != x"testsuite"; then - echo "WARNING: Should be run from top cbuild2 dir" > /dev/stderr + echo "WARNING: Should be run from top abe dir" > /dev/stderr topdir="`readlink -e \`dirname $0\`/..`" else topdir=$PWD @@ -17,7 +17,7 @@ else . "${topdir}/lib/common.sh" || exit 1 warning "no host.conf file! Synthesizing a framework for testing." - remote_snapshots=http://cbuild.validation.linaro.org/snapshots + remote_snapshots=http://abe.validation.linaro.org/snapshots wget_bin=/usr/bin/wget sources_conf=${topdir}/testsuite/test_sources.conf fi @@ -28,13 +28,13 @@ wget_quiet=yes # We always override $local_snapshots so that we don't damage or move the # local_snapshots directory of an existing build. -local_cbuild_tmp="`mktemp -d /tmp/cbuild2.$$.XXX`" -local_snapshots="${local_cbuild_tmp}/snapshots" +local_abe_tmp="`mktemp -d /tmp/abe.$$.XXX`" +local_snapshots="${local_abe_tmp}/snapshots" # If this isn't being run in an existing build dir, create one in our # temp directory. if test ! -d "${local_builds}"; then - local_builds="${local_cbuild_tmp}/builds" + local_builds="${local_abe_tmp}/builds" out="`mkdir -p ${local_builds}`" if test "$?" -gt 1; then error "Couldn't create local_builds dir ${local_builds}" @@ -57,7 +57,7 @@ out="`mkdir -p ${local_snapshots}`" # Since we're testing, we don't load the host.conf file, instead # we create false values that stay consistent. -cbuild_top=/build/cbuild2/test +abe_top=/build/abe/test hostname=test.foobar.org target=x86_64-linux-gnu @@ -135,7 +135,7 @@ totals() echo "============= get_toolname() tests ================" testing="get_toolname: uncompressed tarball" -in="http://cbuild.validation.linaro.org/snapshots/gdb-7.6~20121001+git3e2e76a.tar" +in="http://abe.validation.linaro.org/snapshots/gdb-7.6~20121001+git3e2e76a.tar" out="`get_toolname ${in}`" if test ${out} = "gdb"; then pass "${testing}" @@ -146,7 +146,7 @@ fi # ---------------------------------------------------------------------------------- testing="get_toolname: compressed tarball" -in="http://cbuild.validation.linaro.org/snapshots/gcc-linaro-4.8-2013.06-1.tar.xz" +in="http://abe.validation.linaro.org/snapshots/gcc-linaro-4.8-2013.06-1.tar.xz" out="`get_toolname ${in}`" if test ${out} = "gcc"; then pass "${testing}" @@ -1250,7 +1250,7 @@ if test x"${out}" = x"gcc-linaro-4.8-${date}"; then else # This fails because the tarball name fails to extract the version. This # behavious isn't used by Cbuildv, it was an early feature to have some - # compatability with cbuildv1, which used tarballs. Cbuildv2 produces the + # compatability with abev1, which used tarballs. Cbuildv2 produces the # tarballs, it doesn't need to import them anymore. xfail "${testing}" fixme "create_release_tag returned ${out}" @@ -1320,7 +1320,7 @@ test_checkout () testing="checkout: http://git@/.git" if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" + package="abe.git" branch='' revision='' should="pass" @@ -1331,7 +1331,7 @@ fi testing="checkout: http://git@/.git/" if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" + package="abe.git" branch="gerrit" revision='' should="pass" @@ -1342,7 +1342,7 @@ fi testing="checkout: http://git@/.git@" if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" + package="abe.git" branch='' revision="9bcced554dfc" should="pass" @@ -1353,7 +1353,7 @@ fi testing="checkout: http://git@/.git/unusedbranchnanme@" if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" + package="abe.git" branch="unusedbranchname" revision="9bcced554dfc" should="pass" @@ -1364,7 +1364,7 @@ fi testing="checkout: http://git@/.git/ should fail." if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" + package="abe.git" branch="nonexistentbranch" revision='' should="fail" @@ -1375,7 +1375,7 @@ fi testing="checkout: http://git@/.git@ should fail." if test ! -e "${PWD}/host.conf"; then - package="cbuild2.git" + package="abe.git" branch='' revision="123456bogusbranch" should="fail" diff --git a/testsuite/test_sources.conf b/testsuite/test_sources.conf index 1115185..7bd50c1 100644 --- a/testsuite/test_sources.conf +++ b/testsuite/test_sources.conf @@ -14,7 +14,7 @@ gcc_tab.git http://staging.git.linaro.org/git/toolchain/gcc.git binutils.git git://git.linaro.org/toolchain/binutils.git libgloss.git git://git.linaro.org/toolchain/newlib.git newlib.git git://git.linaro.org/toolchain/newlib.git -cbuild2.git http://git@staging.git.linaro.org/git/toolchain/cbuild2.git +abe.git http://git@staging.git.linaro.org/git/toolchain/abe.git eglibc.git git://git.linaro.org/toolchain/eglibc.git glibc.git git://git.linaro.org/toolchain/glibc.git bitbake.git git://git.openembedded.org/bitbake diff --git a/validate.sh b/validate.sh index dafc054..261c537 100755 --- a/validate.sh +++ b/validate.sh @@ -40,9 +40,9 @@ target=$1 shift # load commonly used functions -cbuild="`which $0`" -topdir="${cbuild_path}" -cbuild2="`basename $0`" +abe="`which $0`" +topdir="${abe_path}" +abe="`basename $0`" . "${topdir}/lib/diff.sh" || exit 1 @@ -51,7 +51,7 @@ declare -a revisions=($*) # Get the path for the other scripts. fullpath="`which $0`" -cbuild2="`dirname ${fullpath}`/cbuild2.sh" +abe="`dirname ${fullpath}`/abe.sh" tcwgweb="`dirname ${fullpath}`/tcwgweb.sh" # We'll move all the results to subdirectories under here @@ -63,16 +63,16 @@ i=0 while test $i -lt ${#revisions[@]}; do stamps="`ls -C1 ${local_builds}/${build}/${target}/*-stage2-build.stamp`" if test "`echo ${stamps} | grep -c ${revisions[$i]}`" -eq 0; then - ${cbuild2} --target ${target} --check gcc=gcc.git@${revisions[$i]} --build all + ${abe} --target ${target} --check gcc=gcc.git@${revisions[$i]} --build all fi sums="`find ${local_builds}/${build}/${target} -name \*.sum`" if test x"${sums}" != x; then - mkdir -p ${resultsdir}/cbuild${revisions[$i]}/${build}-${target} - cp ${sums} ${resultsdir}/cbuild${revisions[$i]}/${build}-${target} + mkdir -p ${resultsdir}/abe${revisions[$i]}/${build}-${target} + cp ${sums} ${resultsdir}/abe${revisions[$i]}/${build}-${target} # We don't need these files leftover from the DejaGnu testsuite # itself. - xz -f ${resultsdir}/cbuild${revisions[$i]}/${build}-${target}/*.sum - rm ${resultsdir}/cbuild${revisions[$i]}/${build}-${target}/{x,xXx,testrun}.sum + xz -f ${resultsdir}/abe${revisions[$i]}/${build}-${target}/*.sum + rm ${resultsdir}/abe${revisions[$i]}/${build}-${target}/{x,xXx,testrun}.sum fi i=`expr $i + 1` done @@ -81,13 +81,13 @@ done # is a series, do them all in the order they were specified on the # command line. if test ${#revisions[@]} -eq 2; then - difftwodirs ${resultsdir}/cbuild${revisions[0]} ${resultsdir}/cbuild${revisions[1]} + difftwodirs ${resultsdir}/abe${revisions[0]} ${resultsdir}/abe${revisions[1]} else j=0 while test $j -lt ${#revisions[@]}; do - first=cbuild${revisions[$j]}/${build}-${target} + first=abe${revisions[$j]}/${build}-${target} j=`expr $j + 1` - second=cbuild${revisions[$j]}/${build}-${target} + second=abe${revisions[$j]}/${build}-${target} if test x"${second}" = x; then break else -- cgit v1.2.3