diff --git a/common.sh b/common.sh index 09094a8bc8..18e04cdd9a 100644 --- a/common.sh +++ b/common.sh @@ -645,7 +645,11 @@ prepare_test_image() { --image="$1/$2" --noinplace ${args} # From now on we use the just-created test image - CHROMEOS_RETURN_VAL="$1/${CHROMEOS_TEST_IMAGE_NAME}" + if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then + CHROMEOS_RETURN_VAL="$1/${CHROMEOS_FACTORY_TEST_IMAGE_NAME}" + else + CHROMEOS_RETURN_VAL="$1/${CHROMEOS_TEST_IMAGE_NAME}" + fi } # Check that the specified file exists. If the file path is empty or the file diff --git a/mod_image_for_test.sh b/mod_image_for_test.sh index 822a293262..769941850b 100755 --- a/mod_image_for_test.sh +++ b/mod_image_for_test.sh @@ -178,8 +178,10 @@ IMAGE_DIR="$(dirname "${FLAGS_image}")" if [ ${FLAGS_inplace} -eq ${FLAGS_FALSE} ]; then if [ ${FLAGS_factory} -eq ${FLAGS_TRUE} ]; then TEST_PATHNAME="${IMAGE_DIR}/${CHROMEOS_FACTORY_TEST_IMAGE_NAME}" + typename="factory" else TEST_PATHNAME="${IMAGE_DIR}/${CHROMEOS_TEST_IMAGE_NAME}" + typename="test" fi if [ ! -f "${TEST_PATHNAME}" ] || \ [ ${FLAGS_force_copy} -eq ${FLAGS_TRUE} ] ; then @@ -188,7 +190,7 @@ if [ ${FLAGS_inplace} -eq ${FLAGS_FALSE} ]; then || die "Cannot copy ${FLAGS_image} to test image" FLAGS_image="${TEST_PATHNAME}" else - echo "Using cached test image" + echo "Using cached ${typename} image" exit fi