cbuildbot: Add logic to build dependencies for tests with no build stage
BUG=None
TEST=grunt-unittest-only-paladin-trybot
CQ-DEPEND=CL:1363714, CL:1366408, CL:1355518
Change-Id: I2e9ebb7e4e5ebb2b89fa3fba3b931e0c76998574
Reviewed-on: https://chromium-review.googlesource.com/1337441
Commit-Ready: Chris McDonald <cjmcdonald@chromium.org>
Tested-by: Chris McDonald <cjmcdonald@chromium.org>
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/cros_run_unit_tests_unittest.py b/scripts/cros_run_unit_tests_unittest.py
new file mode 100644
index 0000000..8e13669
--- /dev/null
+++ b/scripts/cros_run_unit_tests_unittest.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Copyright 2018 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Unit tests for cros_run_unit_tests.py."""
+
+from __future__ import print_function
+
+from chromite.lib import cros_test_lib
+from chromite.scripts import cros_run_unit_tests
+
+
+class DetermineBoardPackagesTest(cros_test_lib.TestCase):
+ """Tests that package determination returns a non-empty set"""
+
+ def testNonEmptyPackageSet(self):
+ """Asserts that the deps of a known package are non-empty"""
+ self.assertTrue(cros_run_unit_tests.determine_board_packages(
+ '/', ('virtual/implicit-system',)))