New issue
Advanced search Search tips

Issue 909073 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Block chromeos_unittests running in cros chrome-sdk

Project Member Reported by jamescook@chromium.org, Nov 28

Issue description

Chrome OS developers sometimes build test suites like "chromeos_unittests" inside their "cros chrome-sdk" shell. Then they run out_board/Release/chromeos_unittests and are confused why they fail.

We should either fail to compile or CHECK() fail in this case so the developer knows what to do.

Comments from an internal thread:

FWIW, I added some gn args that get set iff you're in the simplechrome sdk building for a target board/device/VM:
https://codesearch.chromium.org/chromium/src/build/config/chromeos/rules.gni?rcl=bc29720aa20ddff2510ab2d468a1e35cef4e452c&l=15

We might be able to just assert(!is_chromeos_chrome) in the BUILD.gn targets.

Another option is to pass that down to the test as a DEFINE, and run the IsRunningOnChromeOS() check if it's defined. That would solve the initial concern of running cros-chrome-sdk-built tests on rodete, and wouldn't require an audit/rename of every test.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed

commit 209256f5516f6dd1c7fb5e53fa7c3227f8c79eed
Author: James Cook <jamescook@chromium.org>
Date: Fri Dec 07 18:40:50 2018

Don't allow chromeos unit tests to build in "cros chrome-sdk" shell

The chromeos_* unit test suites are designed to run on Linux, not on
real hardware or in VMs. On the Chromium waterfall they are built
with the linux-chromeos configuration.

Developers using the "cros chrome-sdk" sometimes think they need to
build these targets and run them, either on their host workstation
or on device. The tests aren't expected to work in these environments,
so prevent them from being built.

Bug:  909073 ,  865693 
Test: ninja -C out_eve/Release chromeos_unittests won't compile
Change-Id: Idf8c366f7001ea5bbc744ccba6e627d70f5efebb
Reviewed-on: https://chromium-review.googlesource.com/c/1358509
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614763}
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/build/config/chromeos/rules.gni
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/build/config/compiler/compiler.gni
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/BUILD.gn
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/components/BUILD.gn
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/components/run_all_unittests.cc
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/chromeos/run_all_unittests.cc
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/chromium.chromiumos.json
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/chromium.fyi.json
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/filters/BUILD.gn
[delete] https://crrev.com/1c086040bdda4d0abe86770891aa61de499da645/testing/buildbot/filters/chromeos.chromeos_unittests.filter
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/test_suites.pyl
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/buildbot/waterfalls.pyl
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/testing/test.gni
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/ui/chromeos/BUILD.gn
[modify] https://crrev.com/209256f5516f6dd1c7fb5e53fa7c3227f8c79eed/ui/chromeos/run_all_unittests.cc

Status: Fixed (was: Assigned)

Sign in to add a comment