containers: Fix docker build path and lowercase version parameter

build-dockerimage.sh doesn't live in the src/chromiumos path, and
having mixed-case in the version string passed to the script causes
issues with uploading the finished docker image to the registry.

We return the final registry path to the caller, so lowercasing
won't affect any of the logic on the caller side.

BUG=none
TEST=unittests

Change-Id: I1cee114823a9cc6e92a86028123fc45ad8169fd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3119590
Tested-by: Sean McAllister <smcallis@google.com>
Auto-Submit: Sean McAllister <smcallis@google.com>
Commit-Queue: Sean McAllister <smcallis@google.com>
Reviewed-by: Derek Beckett <dbeckett@chromium.org>
diff --git a/api/controller/test.py b/api/controller/test.py
index 81014d6..6040cf5 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -151,11 +151,12 @@
 
 
 SRC_DIR = os.path.join(constants.SOURCE_ROOT, 'src')
-TEST_SERVICE_DIR = os.path.join(SRC_DIR, 'platform/dev/src/chromiumos/test')
+PLATFORM_DEV_DIR = os.path.join(SRC_DIR, 'platform/dev')
+TEST_SERVICE_DIR = os.path.join(PLATFORM_DEV_DIR, 'src/chromiumos/test')
 TEST_CONTAINER_BUILD_SCRIPTS = [
     os.path.join(TEST_SERVICE_DIR, 'provision/docker/build-dockerimage.sh'),
     os.path.join(TEST_SERVICE_DIR, 'dut/docker/build-dockerimage.sh'),
-    os.path.join(TEST_SERVICE_DIR, 'test/container/utils/build-dockerimage.sh'),
+    os.path.join(PLATFORM_DEV_DIR, 'test/container/utils/build-dockerimage.sh'),
 ]
 
 
@@ -193,7 +194,7 @@
   sysroot = sysroot_lib.Sysroot(build_target.root)
 
   for build_script in TEST_CONTAINER_BUILD_SCRIPTS:
-    cmd = [build_script, chroot.path, version, sysroot.path]
+    cmd = [build_script, chroot.path, version.lower(), sysroot.path]
     cmd_result = cros_build_lib.run(cmd, check=False)
     if cmd_result.returncode == 0:
       output_proto.results.append(test_pb2.TestServiceContainerBuildResult(