diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 19:05:54 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-10 19:05:54 +0000 |
commit | 0c49552feeb890c8ea1f2f7f85bc249e9808a815 (patch) | |
tree | bb55abd39d8c95346de4800b5653864a1d621e96 /tools | |
parent | 62cd5032d4fd657bc49a8cb2d7c27647b46fa31c (diff) | |
download | chromium_src-0c49552feeb890c8ea1f2f7f85bc249e9808a815.zip chromium_src-0c49552feeb890c8ea1f2f7f85bc249e9808a815.tar.gz chromium_src-0c49552feeb890c8ea1f2f7f85bc249e9808a815.tar.bz2 |
clang plugin: Make test script work no matter what the cwd is.
BUG=none
TEST=`tools/scripts/plugin/test/test.sh third_party/llvm-build/Release+Asserts` works.
Review URL: http://codereview.chromium.org/8206021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104753 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/clang/plugins/tests/test.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/clang/plugins/tests/test.sh b/tools/clang/plugins/tests/test.sh index 8d73d7f..322d922 100755 --- a/tools/clang/plugins/tests/test.sh +++ b/tools/clang/plugins/tests/test.sh @@ -49,8 +49,13 @@ elif [[ ! -d "${1}" ]]; then usage exit ${E_BADARGS} else - echo "Using clang directory ${1}..." - export CLANG_DIR="${1}" + export CLANG_DIR="$(PWD)/${1}" + echo "Using clang directory ${CLANG_DIR}..." + + # The golden files assume that the cwd is this directory. To make the script + # work no matter what the cwd is, explicitly cd to there. + cd "$(dirname "${0}")" + if [ "$(uname -s)" = "Linux" ]; then export LIB=so elif [ "$(uname -s)" = "Darwin" ]; then |