run_all_unittests.cc 952 B

12345678910111213141516171819202122232425
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "base/bind.h"
  5. #include "base/test/launcher/unit_test_launcher.h"
  6. #include "base/test/test_suite.h"
  7. #include "build/chromeos_buildflags.h"
  8. #include "chromeos/components/chromeos_components_test_suite.h"
  9. #include "mojo/core/embedder/embedder.h"
  10. #if BUILDFLAG(IS_CHROMEOS_DEVICE)
  11. #error This test target only builds with linux-chromeos, not for real ChromeOS\
  12. devices. See comment in build/config/chromeos/args.gni.
  13. #endif
  14. int main(int argc, char** argv) {
  15. // Some unit tests make Mojo calls.
  16. mojo::core::Init();
  17. ChromeosComponentsTestSuite test_suite(argc, argv);
  18. return base::LaunchUnitTests(argc, argv,
  19. base::BindOnce(&ChromeosComponentsTestSuite::Run,
  20. base::Unretained(&test_suite)));
  21. }