test_build_root: drop libcros checks
Nothing in the tree needs libcros anymore, so as a precursor to removing
that package, drop the root check on its version info.
BUG=chromium-os:15922
TEST=`cbuildbot arm-generic-full` works
TEST=`cbuildbot x86-generic-full` works
Change-Id: I03668c6dbb4cb79dbadb0c98e3c05dca01a8045d
Reviewed-on: https://gerrit.chromium.org/gerrit/18247
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/build_library/test_build_root b/build_library/test_build_root
index 7eb156d..eb59332 100755
--- a/build_library/test_build_root
+++ b/build_library/test_build_root
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2012 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.
@@ -43,59 +43,4 @@
fi
done
-# Extract the version number from lines like:
-# kCrosAPIMinVersion = 29,
-# kCrosAPIVersion = 30
-extract_cros_version() {
- NAME="$1"
- FILE="$2"
- VERSION=$(perl -ne "print \$1 if /^\\s*${NAME}\\s*=\\s*(\\d+)/" "$FILE")
- test -z "$VERSION" && die "Failed to get $NAME from $FILE"
- echo $VERSION
-}
-
-# Check the libcros version compatibility, like we do in libcros at run time.
-# See also platform/cros/version_check.cc and load.cc.
-check_cros_version() {
- CHROME_CROS="${ROOT}/opt/google/chrome/include/chromeos_cros_api.h"
- SYSTEM_CROS="${ROOT}/usr/include/cros/chromeos_cros_api.h"
-
- if [ ! -f "$SYSTEM_CROS" ]; then
- echo "test_build_root: Missing libcros headers."
- return 1
- fi
-
-
- if [ ! -f "$CHROME_CROS" ]; then
- # For compatiblity with old versions of Chrome which don't install headers
- # and already check the libcros version, skip the check here.
- return 0
- fi
-
- # Get the version of libcros in the chromium tree.
- VERSION=$(extract_cros_version kCrosAPIVersion "${CHROME_CROS}")
-
- # Get the min version of libcros in the chromium os tree.
- MIN_VERSION=$(extract_cros_version kCrosAPIMinVersion "${SYSTEM_CROS}")
-
- # Get the max version of libcros in the chromium os tree.
- MAX_VERSION=$(extract_cros_version kCrosAPIVersion "${SYSTEM_CROS}")
-
- if [ "$MIN_VERSION" -gt "$VERSION" ]; then
- echo "test_build_root: System libcros not compatible with Chromium."
- echo "Chromium requires version $VERSION, but system provides $MIN_VERSION"
- echo "or later."
- return 1
- fi
- if [ "$VERSION" -gt "$MAX_VERSION" ]; then
- echo "test_build_root: System libcros not compatible with Chromium headers."
- echo "Chromium requires version $VERSION, but system provides $MAX_VERSION"
- echo "or earlier."
- return 1
- fi
- return 0
-}
-
-check_cros_version || EXITCODE=1
-
exit $EXITCODE