Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Issue 3450025: autotest: Fix problem with logging_UserCrash tgz file being masked. (Closed)

Created:
10 years, 2 months ago by kmixter1
Modified:
9 years, 7 months ago
Reviewers:
zbehan
CC:
chromium-os-reviews_chromium.org, sosa+cc_chromium.org, seano+cc_chromium.org, ericli, petkov+cc_chromium.org
Visibility:
Public.

Description

autotest: Fix problem with logging_UserCrash tgz file being masked. We use a tgz file to hide a binary file that we build and don't want portage to strip. With a change yesterday, autotest-test ebuild started removing all tgz files. Rename it to avoid detection. We could improve this test by running dump_syms on the host and populating a breakpad directory there to avoid needing to sneak symbols onto the target, but that's a larger change. BUG=7009 TEST=Run logging_UserCrash Change-Id: Ib6a131c3656d3ae1a8f96cac49dfe29e3ab71b33 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=9db1b2e

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M client/site_tests/logging_UserCrash/logging_UserCrash.py View 1 chunk +1 line, -1 line 0 comments Download
M client/site_tests/logging_UserCrash/src/Makefile View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
kmixter1
10 years, 2 months ago (2010-09-23 21:56:33 UTC) #1
zbehan
10 years, 2 months ago (2010-09-23 22:08:25 UTC) #2
There's generally another way. The cleanup masks are per-ebuild. If we had
enough granularity of ebuilds, we could come with even more strict cleanup
rules because there's a lot of stuff installed on the target device that is
obviously not needed (test .c sources), and leave the mask for other ebuilds
less specific.

Also, the whole thing is merely a workaround for the fact that autotest does
not really have a concept of "make install" and will gladly upload a 1GB
tarball on the target device if you just drop it in the test directory.

My apology (yet again) for breaking this. I guess I better watch out for
hacks like this. I think there's a way to tell portage to simply not strip
the one binary you need unstripped though, let me look through the docs.

Also, LGTM to this.

On Thu, Sep 23, 2010 at 2:56 PM, <kmixter@chromium.org> wrote:

> Reviewers: zbehan,
>
> Description:
> autotest: Fix problem with logging_UserCrash tgz file being masked.
>
> We use a tgz file to hide a binary file that we build and don't want
> portage to strip.  With a change yesterday, autotest-test ebuild
> started removing all tgz files.  Rename it to avoid detection.  We
> could improve this test by running dump_syms on the host and
> populating a breakpad directory there to avoid needing to sneak
> symbols onto the target, but that's a larger change.
>
> BUG=7009
> TEST=Run logging_UserCrash
>
> Change-Id: Ib6a131c3656d3ae1a8f96cac49dfe29e3ab71b33
>
> Please review this at http://codereview.chromium.org/3450025/show
>
> SVN Base: http://git.chromium.org/git/autotest.git
>
> Affected files:
>  M client/site_tests/logging_UserCrash/logging_UserCrash.py
>  M client/site_tests/logging_UserCrash/src/Makefile
>
>
> Index: client/site_tests/logging_UserCrash/logging_UserCrash.py
> diff --git a/client/site_tests/logging_UserCrash/logging_UserCrash.py
> b/client/site_tests/logging_UserCrash/logging_UserCrash.py
> index
>
e89f1a6c5f6c3065331e34ccc53d2e5ba52184f7..38f4defaab0e0b183215114fb090825bb48ba291
> 100644
> --- a/client/site_tests/logging_UserCrash/logging_UserCrash.py
> +++ b/client/site_tests/logging_UserCrash/logging_UserCrash.py
> @@ -53,7 +53,7 @@ class logging_UserCrash(site_crash_test.CrashTest):
>         crasher is only gzipped to subvert Portage stripping.
>         """
>         self._crasher_path = os.path.join(self.srcdir,
> 'crasher_nobreakpad')
> -        utils.system('cd %s; tar xzf crasher.tgz' %
> +        utils.system('cd %s; tar xzf crasher.tgz-unmasked' %
>                      self.srcdir)
>
>
> Index: client/site_tests/logging_UserCrash/src/Makefile
> diff --git a/client/site_tests/logging_UserCrash/src/Makefile
> b/client/site_tests/logging_UserCrash/src/Makefile
> index
>
838f34c1abde1cc6874dfd046f56c56bff49ee5a..d7dd0000ced2662869eff34f0498ab66876a0325
> 100644
> --- a/client/site_tests/logging_UserCrash/src/Makefile
> +++ b/client/site_tests/logging_UserCrash/src/Makefile
> @@ -5,13 +5,16 @@
>  BINS = crasher_nobreakpad
>  SRC = crasher.cc
>  OBJS = crasher.o bomb.o
> -TGZ = crasher.tgz
> +# Use a non-standard extension to avoid the AUTOTEST_MASK that intends to
> +# remove these since they're usually large and redundant.
> +TGZ = crasher.tgz-unmasked
>
>  all: $(TGZ)
>
>  # gzip so that portage does not strip.
>  $(TGZ): $(BINS)
>        tar czf $(TGZ) $^
> +       rm -f $(BINS)
>
>  crasher_nobreakpad: $(OBJS)
>        $(CXX) $(CXXFLAGS) -o $@ $^
>
>
>

Powered by Google App Engine
This is Rietveld 408576698