autotest: remove annoying deprecated function.
I got sick of seeing deprecation messages for cros_version_to_label
every time I ran test that.
Removing out of frustration since this appears to be simple.
BUG=None
TEST=Ran test_that, it still worked.
Change-Id: Ibf927e218b0c491234252f50a5189d9a248bda5c
Reviewed-on: https://chromium-review.googlesource.com/498028
Commit-Ready: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Allen Li <ayatane@chromium.org>
diff --git a/server/cros/provision.py b/server/cros/provision.py
index 71bec21..a8f63c7 100644
--- a/server/cros/provision.py
+++ b/server/cros/provision.py
@@ -98,19 +98,6 @@
return get_version_label_prefix(image) + ':' + image
-def cros_version_to_label(image):
- """
- Returns the proper label name for a ChromeOS build of |image|.
-
- @param image: A string of the form 'lumpy-release/R28-3993.0.0'
- @returns: A string that is the appropriate label name.
-
- """
- warnings.warn('cros_version_to_label is deprecated', stacklevel=2)
- keyval_label = labellib.KeyvalLabel(Key.CROS_VERSION, image)
- return labellib.format_keyval_label(keyval_label)
-
-
def fwro_version_to_label(image):
"""
Returns the proper label name for a RO firmware build of |image|.
diff --git a/site_utils/test_runner_utils.py b/site_utils/test_runner_utils.py
index 56e71e2..4548325 100755
--- a/site_utils/test_runner_utils.py
+++ b/site_utils/test_runner_utils.py
@@ -28,6 +28,7 @@
from autotest_lib.server import autoserv_utils
from autotest_lib.server import server_logging_config
from autotest_lib.server import utils
+from autotest_lib.utils import labellib
_autoserv_proc = None
@@ -476,7 +477,9 @@
provision failed prior to running any jobs.
"""
# Create host in afe, add board and build labels.
- cros_version_label = provision.cros_version_to_label(build)
+ cros_version_label = labellib.format_keyval_label(
+ labellib.KeyvalLabel(labellib.Key.CROS_VERSION, build))
+
build_label = afe.create_label(cros_version_label)
board_label = afe.create_label(constants.BOARD_PREFIX + board)
new_host = afe.create_host(remote)