hudson.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # Licensed to Cloudera, Inc. under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. Cloudera, Inc. licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. set -e
  18. set -x
  19. BINDIR=$(dirname $0)
  20. desktop_root=$PWD
  21. export REPO_TRACE=1
  22. . $BINDIR/build-functions
  23. git clean -xdf
  24. rm -rf ext
  25. git reset --hard HEAD
  26. build_hadoop
  27. make apps
  28. if python -V 2>&1 | grep -q -v 2.4; then
  29. # Install pylint from our archive
  30. build/env/bin/easy_install \
  31. -f http://archive.cloudera.com/desktop-sdk-python-packages/ \
  32. -H pypi.python.org,archive.cloudera.com pylint
  33. build/env/bin/desktop runpylint all -- -f parseable > PYLINT.txt
  34. fi
  35. rm -f JAVASCRIPTLINT.txt
  36. for FILE in $(find . -name *.js);
  37. do
  38. jsl -conf .jslintrc -nologo -nosummary -nocontext -nofilelisting -process $FILE >> JAVASCRIPTLINT.txt || /bin/true
  39. done;
  40. if [ "$1" == "slow" ]; then
  41. make test-slow
  42. elif [ "$1" == "windmill" ]; then
  43. xvfb-run -a -s '-screen 0 1024x768x16' tools/scripts/hudson_windmill_in_X.sh
  44. else
  45. make test docs
  46. fi