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.
Comment 1 by bugdroid1@chromium.org
, Dec 7