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

Side by Side Diff: chrome/tools/build/mac/keystone_install_test.sh

Issue 365004: When updating on a user ticket, check for system tickets (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/tools/build/mac/keystone_install.sh ('k') | 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 2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2009 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 # Test of the Mac Chrome installer. 7 # Test of the Mac Chrome installer.
8 8
9 9
10 # Where I am 10 # Where I am
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 # Make an old-style destination directory, to test updating from old-style 66 # Make an old-style destination directory, to test updating from old-style
67 # versions to new-style versions. 67 # versions to new-style versions.
68 function make_old_dest() { 68 function make_old_dest() {
69 DEST="${TEMPDIR}"/Dest.app 69 DEST="${TEMPDIR}"/Dest.app
70 rm -rf "${DEST}" 70 rm -rf "${DEST}"
71 mkdir -p "${DEST}"/Contents 71 mkdir -p "${DEST}"/Contents
72 defaults write "${DEST}/Contents/Info" KSVersion 0 72 defaults write "${DEST}/Contents/Info" KSVersion 0
73 cat >"${TEMPDIR}"/ksadmin <<EOF 73 cat >"${TEMPDIR}"/ksadmin <<EOF
74 #!/bin/sh 74 #!/bin/sh
75 if [ -z "\${FAKE_SYSTEM_TICKET}" ] && [ "\${1}" = "-S" ] ; then
76 echo no system tix! >& 2
77 exit 1
78 fi
75 echo " xc=<KSPathExistenceChecker:0x45 path=${DEST}>" 79 echo " xc=<KSPathExistenceChecker:0x45 path=${DEST}>"
76 exit 0 80 exit 0
77 EOF 81 EOF
78 chmod u+x "${TEMPDIR}"/ksadmin 82 chmod u+x "${TEMPDIR}"/ksadmin
79 } 83 }
80 84
81 # Make a new-style destination directory, to test updating between new-style 85 # Make a new-style destination directory, to test updating between new-style
82 # versions. 86 # versions.
83 function make_new_dest() { 87 function make_new_dest() {
84 DEST="${TEMPDIR}"/Dest.app 88 DEST="${TEMPDIR}"/Dest.app
85 rm -rf "${DEST}" 89 rm -rf "${DEST}"
86 RSRCDIR="${DEST}/Contents/Versions/0/${FWKNAME}/Resources" 90 RSRCDIR="${DEST}/Contents/Versions/0/${FWKNAME}/Resources"
87 mkdir -p "${RSRCDIR}" 91 mkdir -p "${RSRCDIR}"
88 defaults write "${DEST}/Contents/Info" CFBundleShortVersionString 0 92 defaults write "${DEST}/Contents/Info" CFBundleShortVersionString 0
89 defaults write "${RSRCDIR}/Info" KSVersion 0 93 defaults write "${RSRCDIR}/Info" KSVersion 0
90 cat >"${TEMPDIR}"/ksadmin <<EOF 94 cat >"${TEMPDIR}"/ksadmin <<EOF
91 #!/bin/sh 95 #!/bin/sh
96 if [ -z "\${FAKE_SYSTEM_TICKET}" ] && [ "\${1}" = "-S" ] ; then
97 echo no system tix! >& 2
98 exit 1
99 fi
92 echo " xc=<KSPathExistenceChecker:0x45 path=${DEST}>" 100 echo " xc=<KSPathExistenceChecker:0x45 path=${DEST}>"
93 exit 0 101 exit 0
94 EOF 102 EOF
95 chmod u+x "${TEMPDIR}"/ksadmin 103 chmod u+x "${TEMPDIR}"/ksadmin
96 } 104 }
97 105
98 # Make a simple source directory - the update that is to be applied 106 # Make a simple source directory - the update that is to be applied
99 function make_src() { 107 function make_src() {
100 chmod ugo+w "${TEMPDIR}" 108 chmod ugo+w "${TEMPDIR}"
101 rm -rf "${TEMPDIR}/${APPNAME}" 109 rm -rf "${TEMPDIR}/${APPNAME}"
(...skipping 17 matching lines...) Expand all
119 mkdir "${TEMPDIR}"/"${APPNAME}" 127 mkdir "${TEMPDIR}"/"${APPNAME}"
120 fail_installer "No source bundle" 128 fail_installer "No source bundle"
121 129
122 make_basic_src_and_dest 130 make_basic_src_and_dest
123 chmod ugo-w "${TEMPDIR}" 131 chmod ugo-w "${TEMPDIR}"
124 fail_installer "Writable dest directory" 132 fail_installer "Writable dest directory"
125 133
126 make_basic_src_and_dest 134 make_basic_src_and_dest
127 fail_installer "Was no KSUpdateURL in dest after copy" 135 fail_installer "Was no KSUpdateURL in dest after copy"
128 136
137 make_basic_src_and_dest
138 defaults write \
139 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \
140 KSUpdateURL "http://foo.bar"
141 export FAKE_SYSTEM_TICKET=1
142 fail_installer "User and system ticket both present"
143 export -n FAKE_SYSTEM_TICKET
144
129 make_src 145 make_src
130 make_old_dest 146 make_old_dest
131 defaults write \ 147 defaults write \
132 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \ 148 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \
133 KSUpdateURL "http://foo.bar" 149 KSUpdateURL "http://foo.bar"
134 pass_installer "Old-style update" 150 pass_installer "Old-style update"
135 151
136 make_basic_src_and_dest 152 make_basic_src_and_dest
137 defaults write \ 153 defaults write \
138 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \ 154 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \
139 KSUpdateURL "http://foo.bar" 155 KSUpdateURL "http://foo.bar"
140 pass_installer "ALL" 156 pass_installer "ALL"
141 157
142 cleanup_tempdir 158 cleanup_tempdir
OLDNEW
« no previous file with comments | « chrome/tools/build/mac/keystone_install.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698