summaryrefslogtreecommitdiffstats
path: root/chrome/tools
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 18:40:34 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-17 18:40:34 +0000
commitf8209cd56d6b3fb89a4afba2897cc86f6bbf287b (patch)
treea7f1801d46fc493545495e0aafecdf03f1579dac /chrome/tools
parentad35d11fa8e27e5d0f882a56725c6950d248be15 (diff)
downloadchromium_src-f8209cd56d6b3fb89a4afba2897cc86f6bbf287b.zip
chromium_src-f8209cd56d6b3fb89a4afba2897cc86f6bbf287b.tar.gz
chromium_src-f8209cd56d6b3fb89a4afba2897cc86f6bbf287b.tar.bz2
Add a script to make necessary zip files for chromebot
runs. I did not extend make_zip.sh because we may add more options to make_chromebot_zip.sh and I want to keep make_zip.sh simple. For now this script only pack standard things. We could add options to pack extensions later. Review URL: http://codereview.chromium.org/78003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rwxr-xr-xchrome/tools/build/win/make_chromebot_zip.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/chrome/tools/build/win/make_chromebot_zip.sh b/chrome/tools/build/win/make_chromebot_zip.sh
new file mode 100755
index 0000000..bc53dbe
--- /dev/null
+++ b/chrome/tools/build/win/make_chromebot_zip.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# A simple shell script for creating necessary zip files for ChromeBot runs
+# from an output directory.
+# Pass the path to the output directory you wish to package.
+
+if [ $# = 0 ]; then
+ echo "usage: make_chromebot_zip.sh path/to/release/dir [output-name]"
+ exit 1
+fi
+
+tools_dir=$(dirname "$0")
+release_dir="$1"
+
+# Create chrome build zip file
+files=$(cat "$tools_dir/FILES")
+test_files=( reliability_tests.exe automated_ui_tests.exe )
+
+output=${2:-chrome-win32}
+rm -fr $output $output.zip
+mkdir $output
+
+# Get the absolute path of the output directory. We need it when copying
+# files.
+output_abs=`cygpath -a $output`
+
+# Use cp --parents to copy full relative directory. Since we need the
+# relative directory for the zip, change into the release dir.
+pushd "$release_dir"
+# The file names in FILES may contain whitespace, e.g. 'First Run'.
+# Change IFS setting so we only split words with '\n'
+IFS_Default=$IFS
+IFS=$'\n'
+for f in ${files[@]}; do
+ cp -r --parents "$f" "$output_abs"
+done
+IFS=$IFS_Default
+for f in ${test_files[@]}; do
+ cp -r --parents "$f" "$output_abs"
+done
+popd
+
+zip -r $output.zip $output
+
+# Create chrome symbol zip file
+sym_files=( chrome_dll.pdb chrome_exe.pdb )
+
+sym_output=${2:-chrome-win32-syms}
+rm -fr $sym_output $sym_output.zip
+mkdir $sym_output
+
+# Again, use cp --parents to copy full relative directory. Since we need the
+# relative directory for the zip, change into the release dir.
+sym_output_abs=`cygpath -a $sym_output`
+pushd "$release_dir"
+for f in ${sym_files[@]}; do
+ cp -r --parents "$f" "$sym_output_abs"
+done
+popd
+
+zip -r $sym_output.zip $sym_output