Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS 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 # Script to take an archived build result and prepare a hwqual release. | 7 # Script to take an archived build result and prepare a hwqual release. |
| 8 | 8 |
| 9 # Load common constants. This should be the first executable line. | 9 # Load common constants. This should be the first executable line. |
| 10 # The path to common.sh should be relative to your script's location. | 10 # The path to common.sh should be relative to your script's location. |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 | 38 |
| 39 FLAGS_from=$(readlink -f "${FLAGS_from}") | 39 FLAGS_from=$(readlink -f "${FLAGS_from}") |
| 40 | 40 |
| 41 if [[ -z "${FLAGS_to}" ]]; then | 41 if [[ -z "${FLAGS_to}" ]]; then |
| 42 FLAGS_to="${FLAGS_from}" | 42 FLAGS_to="${FLAGS_from}" |
| 43 fi | 43 fi |
| 44 | 44 |
| 45 local script_dir=$(dirname "$0") | 45 local script_dir=$(dirname "$0") |
| 46 | 46 |
| 47 script_dir=$(readlink -f "${script_dir}") | 47 script_dir=$(readlink -f "${script_dir}") |
| 48 docgen_dir="autotest/utils/docgen" | |
| 49 html_target="${TMP}/autotest/client/site_tests/suite_HWQual/html" | |
| 48 | 50 |
| 49 trap cleanup EXIT | 51 trap cleanup EXIT |
| 50 | 52 |
| 51 cd "${TMP}" | 53 cd "${TMP}" |
| 52 | 54 |
| 53 echo "Extracting build artifacts..." | 55 echo "Extracting build artifacts..." |
| 54 unzip "${FLAGS_from}/${FLAGS_zipname}" | 56 unzip "${FLAGS_from}/${FLAGS_zipname}" |
| 55 mkdir -p image | 57 mkdir -p image |
| 56 mkdir -p "tarball/${FLAGS_output_tag}" | 58 mkdir -p "tarball/${FLAGS_output_tag}" |
| 57 | 59 |
| 58 echo "Extracting autotest from build artifacts..." | 60 echo "Extracting autotest from build artifacts..." |
| 59 tar --bzip2 -xf autotest.tar.bz2 | 61 tar --bzip2 -xf autotest.tar.bz2 |
| 62 # Create HTML and PDF test documentation for HWQual Tests. | |
|
petkov
2010/06/02 19:52:09
Add an empty line before this one.
| |
| 63 echo "Generating test documentation..." | |
| 64 cd "${docgen_dir}" | |
| 65 ./CreateDocs.py --docversion ${FLAGS_output_tag} --html ${html_target} | |
| 66 make -C latex pdf | |
| 67 mv latex/refman.pdf "${html_target}/HWQual.pdf" | |
| 68 # Clean up the generated files. | |
| 69 rm -rf testsource latex *.log | |
| 70 | |
| 71 cd "${TMP}" | |
| 72 | |
| 60 mv chromiumos_test_image.bin image/chromiumos_image.bin | 73 mv chromiumos_test_image.bin image/chromiumos_image.bin |
| 61 | 74 |
| 62 echo "Formatting rootfs as a USB image..." | 75 echo "Formatting rootfs as a USB image..." |
| 63 "${script_dir}/image_to_usb.sh" --from=image \ | 76 "${script_dir}/image_to_usb.sh" --from=image \ |
| 64 --to="tarball/${FLAGS_output_tag}/chromeos-hwqual-usb.img" | 77 --to="tarball/${FLAGS_output_tag}/chromeos-hwqual-usb.img" |
| 65 | 78 |
| 66 echo "Inserting documentation and autotest to tarball..." | 79 echo "Inserting documentation and autotest to tarball..." |
| 67 ln -s \ | 80 ln -s \ |
| 68 "${FLAGS_output_tag}/autotest/client/site_tests/suite_HWQual/README.txt" \ | 81 "${FLAGS_output_tag}/autotest/client/site_tests/suite_HWQual/README.txt" \ |
| 69 tarball | 82 tarball |
| 83 ln -s \ | |
| 84 "${FLAGS_output_tag}/autotest/client/site_tests/suite_HWQual/html" tarball | |
| 70 ln -s autotest/client/site_tests/suite_HWQual/manual \ | 85 ln -s autotest/client/site_tests/suite_HWQual/manual \ |
| 71 "tarball/${FLAGS_output_tag}" | 86 "tarball/${FLAGS_output_tag}" |
| 72 cp "${script_dir}/mod_for_test_scripts/ssh_keys/testing_rsa" \ | 87 cp "${script_dir}/mod_for_test_scripts/ssh_keys/testing_rsa" \ |
| 73 "tarball/${FLAGS_output_tag}" | 88 "tarball/${FLAGS_output_tag}" |
| 74 chmod 0400 "tarball/${FLAGS_output_tag}/testing_rsa" | 89 chmod 0400 "tarball/${FLAGS_output_tag}/testing_rsa" |
| 75 mv autotest "tarball/${FLAGS_output_tag}" | 90 mv autotest "tarball/${FLAGS_output_tag}" |
| 76 cp "${script_dir}/generate_test_report" "tarball/${FLAGS_output_tag}" | 91 cp "${script_dir}/generate_test_report" "tarball/${FLAGS_output_tag}" |
| 77 | |
| 78 echo "Creating ${FLAGS_to}/${FLAGS_output_tag}.tar.bz2..." | 92 echo "Creating ${FLAGS_to}/${FLAGS_output_tag}.tar.bz2..." |
| 79 mkdir -p "${FLAGS_to}" | 93 mkdir -p "${FLAGS_to}" |
| 80 cd tarball | 94 cd tarball |
| 81 tar --bzip2 -cf "${FLAGS_to}/${FLAGS_output_tag}.tar.bz2" . | 95 tar --bzip2 -cf "${FLAGS_to}/${FLAGS_output_tag}.tar.bz2" . |
| 82 | 96 |
| 83 trap - EXIT | 97 trap - EXIT |
| 84 cleanup | 98 cleanup |
| 85 | 99 |
| 86 echo "Done." | 100 echo "Done." |
| 87 cd "${script_dir}" | 101 cd "${script_dir}" |
| 88 } | 102 } |
| 89 | 103 |
| 90 main "$@" | 104 main "$@" |
| OLD | NEW |