Commit Graph

9 Commits

Author SHA1 Message Date
Michael Marineau
62ae4d60b1 fix(test_image_content): Improve /usr symlink and conflict tests.
Now uses the package database instead of filesystem so the check works
even if /bin and friends are symlinks to /usr. Also disable the
whitelist and check that the expected symlinks are correct if the
symlink-usr USE flag is enabled.
2013-12-09 19:32:54 -08:00
Michael Marineau
241d135126 fix(test_build_root): Switch to using test_image_content
Start using the more complete test_image_content test for the build root
and add the test to the end of build_packages.
2013-11-26 17:14:50 -08:00
Brandon Philips
9191f32d77 fix(test_build_root): fix tests for coreos
remove chrome and Xorg test

Change-Id: I6fe575954a8110c6bd94cbe7874b2cbea90def45
2013-02-14 16:18:57 -08:00
Mike Frysinger
2cf2102f99 test_build_root: convert to arrays
Minor code clean up.

BUG=None
TEST=`build_image` still works + boots

Change-Id: I0e26dd3575f963a52d522c4f7c2da8aa5a7dda5c
Reviewed-on: https://gerrit.chromium.org/gerrit/30262
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-08-14 13:38:33 -07:00
Brian Harring
7f175a59e1 common.sh: output a backtrace and debug information on failure.
Currently, if set -e spots a nonzero exit we basically have
no real debug information- it just stops immediately without stating
where or why.  This forces our scripts to be stupidly verbose so
we can track roughly where they were, thus when they fail we can
use that information to localize the rough exit point.

Instead we should be traping that set -e induced exit and
outputing necessary debug information to run it down.  This includes
outputing the relevant stack trace, or at least what we can get of
it.

The 'die' function is now enhanced to automatically dump the trace
that lead to it.  For most consumers this is desired- however for
commandline parsing induced dies ("--board is missing" for example),
the trace is noise.  For those cases, a 'die_notrace' function was
added that retains the original non-backtrace behaviour.

Example output via instrumenting cros_generate_breakpad_symbols
w/ the failing command '/bin/false' (nonzero exit code).

Before:
./cros_generate_breakpad_symbols  monkeys --board=x86-alex
<no output at all, just exit code 1>

With this CL:
./cros_generate_breakpad_symbols  monkeys --board=x86-alex
ERROR   : script called: ./cros_generate_breakpad_symbols 'monkeys' '--board=x86-alex'
ERROR   : Backtrace:  (most recent call is last)
ERROR   :   file cros_generate_breakpad_symbols, line 207, called: main 'monkeys' '--board=x86-alex'
ERROR   :   file cros_generate_breakpad_symbols, line 163, called: die_err_trap '/bin/false' '1'
ERROR   :
ERROR   : Command failed:
ERROR   :   Command '/bin/false' exited with nonzero code: 1

BUG=chromium-os:30598
TEST=inject a failing command into a script, verify the output.
TEST=inject a 'command not found', verify the output
TEST=cbuildbot x86-generic-full --remote
TEST=cbuildbot arm-tegra2-full --remote
TEST=cbuildbot chromiumos-sdk --remote

Change-Id: I517ffde4d1bb7e2310a74f5a6455b53ba2dea86c
Reviewed-on: https://gerrit.chromium.org/gerrit/17225
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-05-07 17:19:41 -07:00
Mike Frysinger
00c2370856 test_build_root: drop libcros checks
Nothing in the tree needs libcros anymore, so as a precursor to removing
that package, drop the root check on its version info.

BUG=chromium-os:15922
TEST=`cbuildbot arm-generic-full` works
TEST=`cbuildbot x86-generic-full` works

Change-Id: I03668c6dbb4cb79dbadb0c98e3c05dca01a8045d
Reviewed-on: https://gerrit.chromium.org/gerrit/18247
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-16 09:04:11 -07:00
Mike Frysinger
53d3680f54 test_build_root: use helper funcs for output
We've got nifty output helpers.  Use them.

BUG=None
TEST=build_packages+build_image for x86-alex works

Change-Id: I03172a8b1baba770cd425a52a1061e998a9717b6
Reviewed-on: https://gerrit.chromium.org/gerrit/18246
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-15 13:29:22 -07:00
Stéphane Marchesin
27ef3ab406 Remove chromeos-wm from the files that we test for.
With Aura, we won't have a need for the WM any more.

TEST=built an image without chromeos-wm, verified that the build system didn't complain.

Change-Id: Id6e5006770f72ea45f440dbe56ff7f53262864c1
Reviewed-on: https://gerrit.chromium.org/gerrit/15212
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
2012-02-03 10:17:08 -08:00
J. Richard Barnette
f2206118f3 Isolate scripts and files that are used only in build_image
A modest number of different scripts and files have a usage
restricted to build_image.  Move those files to build_library,
to prevent them accumulating unwanted clients.

BUG=chromium-os:17390
TEST=build_image
TEST=grep relevant sources for references to all the files

Change-Id: I3e9f6447ec34c09ea2d61f29ac343386a1e122b9
Reviewed-on: http://gerrit.chromium.org/gerrit/4762
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-07-27 08:46:01 -07:00