| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # | 2 # |
| 3 # Copyright 2015 The Chromium Authors. All rights reserved. | 3 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 # | 6 # |
| 7 # This script is to ease running Findit locally, running its unit tests, and | 7 # This script is to ease running Findit locally, running its unit tests, and |
| 8 # deploying Findit to App Engine. | 8 # deploying Findit to App Engine. |
| 9 | 9 |
| 10 THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE:-$0}" )" && pwd )" | 10 THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE:-$0}" )" && pwd )" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 echo " queue.yaml since last deployment, please run appropriate commands" | 45 echo " queue.yaml since last deployment, please run appropriate commands" |
| 46 echo " below to update them:" | 46 echo " below to update them:" |
| 47 echo " ${APP_CFG} update_cron -A $1 ${FINDIT_DIR}" | 47 echo " ${APP_CFG} update_cron -A $1 ${FINDIT_DIR}" |
| 48 echo " ${APP_CFG} update_dispatch -A $1 ${FINDIT_DIR}" | 48 echo " ${APP_CFG} update_dispatch -A $1 ${FINDIT_DIR}" |
| 49 echo " ${APP_CFG} update_indexes -A $1 ${FINDIT_DIR}" | 49 echo " ${APP_CFG} update_indexes -A $1 ${FINDIT_DIR}" |
| 50 echo " ${APP_CFG} update_queues -A $1 ${FINDIT_DIR}" | 50 echo " ${APP_CFG} update_queues -A $1 ${FINDIT_DIR}" |
| 51 } | 51 } |
| 52 | 52 |
| 53 run_unittests() { | 53 run_unittests() { |
| 54 local coverage_report_dir="${TMP_DIR}/coverage" | 54 local coverage_report_dir="${TMP_DIR}/coverage" |
| 55 python ${INFRA_DIR}/test.py test --html-report ${coverage_report_dir} \ | 55 python ${INFRA_DIR}/test.py test appengine/findit --html-report ${coverage_rep
ort_dir} |
| 56 appengine/findit | |
| 57 echo "Code coverage report file://${coverage_report_dir}/index.html" | 56 echo "Code coverage report file://${coverage_report_dir}/index.html" |
| 58 } | 57 } |
| 59 | 58 |
| 60 run_findit_locally() { | 59 run_findit_locally() { |
| 61 local options="--storage_path ${TMP_DIR}/findit" | 60 local options="--storage_path ${TMP_DIR}/findit" |
| 62 python ${GOOGLE_APP_ENGINE_DIR}/dev_appserver.py ${options} ${FINDIT_DIR}/disp
atch.yaml ${FINDIT_MODULES} | 61 python ${GOOGLE_APP_ENGINE_DIR}/dev_appserver.py ${options} ${FINDIT_DIR}/disp
atch.yaml ${FINDIT_MODULES} |
| 63 } | 62 } |
| 64 | 63 |
| 65 deploy_findit_for_test() { | 64 deploy_findit_for_test() { |
| 66 # Deploy a version for testing, the version name is the same as the user name. | 65 # Deploy a version for testing, the version name is the same as the user name. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 deploy-test-dev) | 170 deploy-test-dev) |
| 172 deploy_findit_for_test "dev" | 171 deploy_findit_for_test "dev" |
| 173 ;; | 172 ;; |
| 174 deploy-test-prod) | 173 deploy-test-prod) |
| 175 deploy_findit_for_test "prod" | 174 deploy_findit_for_test "prod" |
| 176 ;; | 175 ;; |
| 177 *) | 176 *) |
| 178 print_usage | 177 print_usage |
| 179 ;; | 178 ;; |
| 180 esac | 179 esac |
| OLD | NEW |