[autotest] Improve provision unit test coverage.
The provision unit tests had coverage for a small sampling of
version strings, to test that those strings were accurately
categorized to specific version labels. This expands the coverage
to include a larger variety of strings, including new coverage for
CROS_ANDROID.
BUG=None
TEST=run the unit tests
Change-Id: I4e06b2cba36a59a2bbfdb22530ed6c0d3c3701e8
Reviewed-on: https://chromium-review.googlesource.com/1131931
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Jacob Kopczynski <jkop@chromium.org>
diff --git a/server/cros/provision_unittest.py b/server/cros/provision_unittest.py
index 56f5948..2daa23d 100755
--- a/server/cros/provision_unittest.py
+++ b/server/cros/provision_unittest.py
@@ -8,8 +8,19 @@
import common
from autotest_lib.server.cros import provision
-_CROS_VERSION_SAMPLES = ['cave-release/R57-9030.0.0']
-_ANDROID_VERSION_SAMPLES = ['git_mnc-release/shamu-userdebug/2457013']
+_CROS_VERSION_SAMPLES = [
+ 'cave-release/R57-9030.0.0',
+ 'grunt-llvm-next-toolchain-tryjob/R69-10851.0.0-b2726174'
+ 'eve-tot-chrome-pfq-informational/R69-10822.0.0-b2700960',
+]
+_CROS_ANDROID_VERSION_SAMPLES = [
+ 'git_nyc-mr1-arc/cheets_arm-user/4866647',
+ 'git_nyc-mr1-arc/cheets_arm-user/P6244267',
+ 'git_nyc-mr1-arc/cheets_x86-user/P6256537',
+]
+_ANDROID_VERSION_SAMPLES = [
+ 'git_mnc-release/shamu-userdebug/2457013'
+]
class ActionTestCase(unittest.TestCase):
@@ -42,6 +53,11 @@
self._do_test_prefixes(provision.CROS_VERSION_PREFIX,
_CROS_VERSION_SAMPLES)
+ def test_cros_android_prefix(self):
+ """Test handling of Chrome OS version strings."""
+ self._do_test_prefixes(provision.CROS_ANDROID_VERSION_PREFIX,
+ _CROS_ANDROID_VERSION_SAMPLES)
+
def test_android_prefix(self):
"""Test handling of Android version strings."""
self._do_test_prefixes(provision.ANDROID_BUILD_VERSION_PREFIX,