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

Side by Side Diff: chrome/installer/mac/keystone_install_test.sh

Issue 2755007: Move the remainder of the installer-related files to chrome/installer/mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/installer/mac/README.chromium ('k') | chrome/installer/mac/pkg-dmg » ('j') | 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 exit 0 87 exit 0
88 EOF 88 EOF
89 chmod u+x "${TEMPDIR}"/ksadmin 89 chmod u+x "${TEMPDIR}"/ksadmin
90 } 90 }
91 91
92 # Make a new-style destination directory, to test updating between new-style 92 # Make a new-style destination directory, to test updating between new-style
93 # versions. 93 # versions.
94 function make_new_dest() { 94 function make_new_dest() {
95 DEST="${TEMPDIR}"/Dest.app 95 DEST="${TEMPDIR}"/Dest.app
96 rm -rf "${DEST}" 96 rm -rf "${DEST}"
97 RSRCDIR="${DEST}/Contents/Versions/0/${FWKNAME}/Resources"
98 mkdir -p "${RSRCDIR}"
99 defaults write "${DEST}/Contents/Info" CFBundleShortVersionString 0 97 defaults write "${DEST}/Contents/Info" CFBundleShortVersionString 0
100 defaults write "${RSRCDIR}/Info" KSVersion 0 98 defaults write "${DEST}/Contents/Info" KSVersion 0
101 cat >"${TEMPDIR}"/ksadmin <<EOF 99 cat >"${TEMPDIR}"/ksadmin <<EOF
102 #!/bin/sh 100 #!/bin/sh
103 if [ "\${1}" = "--ksadmin-version" ] ; then 101 if [ "\${1}" = "--ksadmin-version" ] ; then
104 echo "${KSADMIN_VERSION_LIE}" 102 echo "${KSADMIN_VERSION_LIE}"
105 exit 0 103 exit 0
106 fi 104 fi
107 if [ -z "\${FAKE_SYSTEM_TICKET}" ] && [ "\${1}" = "-S" ] ; then 105 if [ -z "\${FAKE_SYSTEM_TICKET}" ] && [ "\${1}" = "-S" ] ; then
108 echo no system tix! >& 2 106 echo no system tix! >& 2
109 exit 1 107 exit 1
110 fi 108 fi
111 echo " xc=<KSPathExistenceChecker:0x45 path=${DEST}>" 109 echo " xc=<KSPathExistenceChecker:0x45 path=${DEST}>"
112 exit 0 110 exit 0
113 EOF 111 EOF
114 chmod u+x "${TEMPDIR}"/ksadmin 112 chmod u+x "${TEMPDIR}"/ksadmin
115 } 113 }
116 114
117 # Make a simple source directory - the update that is to be applied 115 # Make a simple source directory - the update that is to be applied
118 function make_src() { 116 function make_src() {
119 chmod ugo+w "${TEMPDIR}" 117 chmod ugo+w "${TEMPDIR}"
120 rm -rf "${TEMPDIR}/${APPNAME}" 118 rm -rf "${TEMPDIR}/${APPNAME}"
121 RSRCDIR="${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources" 119 RSRCDIR="${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources"
122 mkdir -p "${RSRCDIR}" 120 mkdir -p "${RSRCDIR}"
123 defaults write "${TEMPDIR}/${APPNAME}/Contents/Info" \ 121 defaults write "${TEMPDIR}/${APPNAME}/Contents/Info" \
124 CFBundleShortVersionString "1" 122 CFBundleShortVersionString "1"
125 defaults write "${RSRCDIR}/Info" \ 123 defaults write "${TEMPDIR}/${APPNAME}/Contents/Info" \
126 KSProductID "com.google.Chrome" 124 KSProductID "com.google.Chrome"
127 defaults write "${RSRCDIR}/Info" \ 125 defaults write "${TEMPDIR}/${APPNAME}/Contents/Info" \
128 KSVersion "2" 126 KSVersion "2"
129 } 127 }
130 128
131 function make_basic_src_and_dest() { 129 function make_basic_src_and_dest() {
132 make_src 130 make_src
133 make_new_dest 131 make_new_dest
134 } 132 }
135 133
136 fail_installer "No source anything" 134 fail_installer "No source anything"
137 135
138 mkdir "${TEMPDIR}"/"${APPNAME}" 136 mkdir "${TEMPDIR}"/"${APPNAME}"
139 fail_installer "No source bundle" 137 fail_installer "No source bundle"
140 138
141 make_basic_src_and_dest 139 make_basic_src_and_dest
142 chmod ugo-w "${TEMPDIR}" 140 chmod ugo-w "${TEMPDIR}"
143 fail_installer "Writable dest directory" 141 fail_installer "Writable dest directory"
144 142
145 make_basic_src_and_dest 143 make_basic_src_and_dest
146 fail_installer "Was no KSUpdateURL in dest after copy" 144 fail_installer "Was no KSUpdateURL in dest after copy"
147 145
148 make_basic_src_and_dest 146 make_basic_src_and_dest
149 defaults write \ 147 defaults write "${TEMPDIR}/${APPNAME}/Contents/Info" KSUpdateURL "http://foobar"
150 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \
151 KSUpdateURL "http://foo.bar"
152 export FAKE_SYSTEM_TICKET=1 148 export FAKE_SYSTEM_TICKET=1
153 fail_installer "User and system ticket both present" 149 fail_installer "User and system ticket both present"
154 export -n FAKE_SYSTEM_TICKET 150 export -n FAKE_SYSTEM_TICKET
155 151
156 make_src 152 make_src
157 make_old_dest 153 make_old_dest
158 defaults write \ 154 defaults write "${TEMPDIR}/${APPNAME}/Contents/Info" KSUpdateURL "http://foobar"
159 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \
160 KSUpdateURL "http://foo.bar"
161 pass_installer "Old-style update" 155 pass_installer "Old-style update"
162 156
163 make_basic_src_and_dest 157 make_basic_src_and_dest
164 defaults write \ 158 defaults write "${TEMPDIR}/${APPNAME}/Contents/Info" KSUpdateURL "http://foobar"
165 "${TEMPDIR}/${APPNAME}/Contents/Versions/1/${FWKNAME}/Resources/Info" \
166 KSUpdateURL "http://foo.bar"
167 pass_installer "ALL" 159 pass_installer "ALL"
168 160
169 cleanup_tempdir 161 cleanup_tempdir
OLDNEW
« no previous file with comments | « chrome/installer/mac/README.chromium ('k') | chrome/installer/mac/pkg-dmg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698