[autotest] Change lab status build check to use an anchored pattern.

When using the lab status to block a build using a regular expression,
this now uses re.match(), causing the search to be anchored at the
beginning (but not the end).  This makes it easier to do the right
thing when you want to block "quawks" but not "squawks", among other
cases.

BUG=None
TEST=run the (new) unit tests

Change-Id: I34f0f98df8c2a0506c5b56ff9d628683c610f7c0
Reviewed-on: https://chromium-review.googlesource.com/280840
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
diff --git a/server/site_utils.py b/server/site_utils.py
index 7eae278..d04da74 100644
--- a/server/site_utils.py
+++ b/server/site_utils.py
@@ -218,7 +218,7 @@
     if not build_exceptions or not build:
         return
     for build_pattern in build_exceptions.group(1).split():
-        if re.search(build_pattern, build):
+        if re.match(build_pattern, build):
             raise TestLabException('Chromium OS Test Lab is closed: '
                                    '%s matches %s.' % (
                                            build, build_pattern))
@@ -544,4 +544,4 @@
              cannot be imported.
 
     """
-    return not cros_build_lib or cros_build_lib.IsInsideChroot()
\ No newline at end of file
+    return not cros_build_lib or cros_build_lib.IsInsideChroot()