[autotest] Search for control files more precisely

In control_file_getter.DevServerGetter, we use a regexp to go through
the list of files returned from the dev server, looking for the
control file the caller wants to run.  The existing re has no anchor
at the end, so it was basically doing prefix matching.  So, looking
for 'control.bvt' would be non-unique fail if 'control.bvt' and
'control.bvt_bigger' both existed.

This CL adds an anchor at the end, so that 'control.bvt' matches only
'control.bvt', 'dummy_Pass/control' matches only that, etc etc etc.

BUG=chromium-os:30824
TEST=use run_suite to run the 'dummy' suite
TEST=create a 'dummy_x1' suite control file, and run that with run_suite as well.
STATUS=Fixed

Change-Id: I1127ce721e176f729406868d346c2240f22d9cde
Reviewed-on: https://gerrit.chromium.org/gerrit/22849
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Masone <cmasone@chromium.org>
diff --git a/server/cros/control_file_getter.py b/server/cros/control_file_getter.py
index 2f83538..3ec4ac0 100644
--- a/server/cros/control_file_getter.py
+++ b/server/cros/control_file_getter.py
@@ -89,9 +89,9 @@
             raise error.ControlFileNotFound('No control files found.')
 
         if 'control' not in test_name:
-            regexp = re.compile(os.path.join(test_name, 'control'))
+            regexp = re.compile(os.path.join(test_name, 'control$'))
         else:
-            regexp = re.compile(test_name)
+            regexp = re.compile(test_name + '$')
         candidates = filter(regexp.search, self._files)
         if not candidates:
             raise error.ControlFileNotFound('No control file for ' + test_name)