Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/instrumented_libraries/scripts/build_and_package.sh

Issue 1004683003: Address review comments for r322149 (package script for instrumented libs). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 set -eu 6 set -eu
7 7
8 supported_build_types="msan-no-origins msan-chained-origins" 8 supported_build_types="msan-no-origins msan-chained-origins"
9 supported_releases="precise trusty" 9 supported_releases="precise trusty"
10 ubuntu_release=$(lsb_release -cs) 10 ubuntu_release=$(lsb_release -cs)
(...skipping 12 matching lines...) Expand all
23 "msan-no-origins") 23 "msan-no-origins")
24 local gyp_defines="msan=1 msan_track_origins=0" 24 local gyp_defines="msan=1 msan_track_origins=0"
25 ;; 25 ;;
26 *) 26 *)
27 show_help 27 show_help
28 exit 1 28 exit 1
29 ;; 29 ;;
30 esac 30 esac
31 31
32 local archive_name=${build_type}-${ubuntu_release} 32 local archive_name=${build_type}-${ubuntu_release}
33 local out_dir=out_${archive_name} 33 local out_dir=out-${archive_name}
34 34
35 echo "Building instrumented libraries in ${out_dir}..." 35 echo "Building instrumented libraries in ${out_dir}..."
36 36
37 rm -rf $out_dir 37 rm -rf $out_dir
38 mkdir $out_dir 38 mkdir $out_dir
39 39
40 GYP_DEFINES="${gyp_defines} use_instrumented_libraries=1 instrumented_librarie s_jobs=8" \ 40 GYP_DEFINES="${gyp_defines} \
41 use_instrumented_libraries=1 instrumented_libraries_jobs=8" \
41 GYP_GENERATOR_FLAGS="output_dir=${out_dir}" \ 42 GYP_GENERATOR_FLAGS="output_dir=${out_dir}" \
42 gclient runhooks 43 gclient runhooks
43 44
44 ninja -C ${out_dir}/Release instrumented_libraries 45 ninja -j4 -C ${out_dir}/Release instrumented_libraries
45 46
46 echo "Creating archive ${archive_name}.tgz..." 47 echo "Creating archive ${archive_name}.tgz..."
47 48
48 files=$(ls -1 ${out_dir}/Release/instrumented_libraries) 49 files=$(ls -1 ${out_dir}/Release/instrumented_libraries)
49 50
50 tar zcf ${archive_name}.tgz -C ${out_dir}/Release/instrumented_libraries --exc lude="?san/*.txt" ${files} 51 tar zcf ${archive_name}.tgz -C ${out_dir}/Release/instrumented_libraries \
52 --exclude="?san/*.txt" ${files}
51 53
52 echo To upload, run: 54 echo To upload, run:
53 echo upload_to_google_storage.py -b chromium-instrumented-libraries ${archive_ name}.tgz 55 echo upload_to_google_storage.py -b \
56 chromium-instrumented-libraries ${archive_name}.tgz
54 echo You should then commit the resulting .sha1 file. 57 echo You should then commit the resulting .sha1 file.
55 } 58 }
56 59
57 if ! [[ "${supported_releases}" =~ ${ubuntu_release} ]] 60 if ! [[ "${supported_releases}" =~ ${ubuntu_release} ]]
58 then 61 then
59 echo "Unsupported Ubuntu release: ${ubuntu_release}" 62 echo "Unsupported Ubuntu release: ${ubuntu_release}"
63 echo "Supported releases: ${supported_releases}"
60 exit 1 64 exit 1
61 fi 65 fi
62 66
63 if [ -z "${1-}" ] 67 if [ -z "${1-}" ]
64 then 68 then
65 show_help 69 show_help
66 exit 0 70 exit 0
67 fi 71 fi
68 72
69 if ! [[ "all ${supported_build_types}" =~ $1 ]] 73 if ! [[ "all ${supported_build_types}" =~ $1 ]]
70 then 74 then
71 show_help 75 show_help
72 exit 1 76 exit 1
73 fi 77 fi
74 if [ "$1" == "all" ] 78 if [ "$1" == "all" ]
75 then 79 then
76 for build_type in ${supported_build_types} 80 for build_type in ${supported_build_types}
77 do 81 do
78 build_libraries ${build_type} 82 build_libraries ${build_type}
79 done 83 done
80 else 84 else
81 build_libraries $1 85 build_libraries $1
82 fi 86 fi
83 87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698