Files
OpenCellular/emerge_test.sh
Alex Deymo e08ee28548 Remove futility linker script.
The futility.lds linker script was used to generate a table with
all the symbols in a specific section called .futil_cmds listed
in order under the symbol "futil_cmds". This allows the source files
to define a command and let the linker figure out the list of
compiled commands. Nevertheless, passing this linker script
makes the linker leave a gap of about 2MiB in the output ELF file.

Instead of mess up with linker scripts just to generate a table of
commands, this patch generates such table in the Makefile looking
at the included sources and compiling that table. The result is a
futility binary of about 88 KiB instead of the 2.1 MiB required
originally.

This patch also adds sys-boot/chromeos-u-boot to the list of ebuilds
tested by emerge_test.sh.

BUG=chromium:408926
BRANCH=None
TEST=BOARD=link ./emerge_test.sh
TEST=BOARD=daisy_spring ./emerge_test.sh
TEST=`readelf -S futility` shows no gap.
TEST=/usr/bin/futility shows no difference in the help output.

Change-Id: I9c0febc76140b404d48aa13e7f948e8ea77a41b5
Reviewed-on: https://chromium-review.googlesource.com/215496
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
2014-09-02 20:25:22 +00:00

61 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Tests emerging all the ebuilds that use vboot_reference either as an
# ebuild dependency or by checking out the code and compiling it in a
# different ebuild. This is meant to be run from the chroot as part of testing
# a new change in vboot_reference.
# Required ebuilds:
TEST_EBUILDS="
sys-boot/chromeos-bootimage
sys-boot/chromeos-u-boot
sys-boot/coreboot
sys-boot/depthcharge
chromeos-base/chromeos-cryptohome
chromeos-base/chromeos-ec
chromeos-base/chromeos-installer
chromeos-base/chromeos-initramfs
chromeos-base/chromeos-login
chromeos-base/update_engine
chromeos-base/vboot_reference
chromeos-base/verity
"
set -e
# Check running inside the chroot.
if [ ! -e /etc/cros_chroot_version ]; then
echo "You must run this inside the chroot." >&2
exit 1
fi
# Detect the target board.
if [ "x${BOARD}" == "x" ]; then
if [ -e ~/trunk/src/scripts/.default_board ]; then
BOARD="`cat ~/trunk/src/scripts/.default_board`"
else
echo "You must pass BOARD environment variable or set a default board." >&2
exit 1
fi
fi
VBOOT_REF_DIR="$(dirname "$0")"
echo "Running tests for board '${BOARD}' from ${VBOOT_REF_DIR}"
cd "${VBOOT_REF_DIR}"
echo "Running make runtests..."
make runtests -j32
echo "Removing build artifacts."
rm -rf build build-main
echo "Running emerge tests (runs cros_workon start)."
# Ignore errors about already working on those repos.
cros_workon-${BOARD} start ${TEST_EBUILDS} || true
USE=depthcharge emerge-${BOARD} ${TEST_EBUILDS}