Repository: incubator-slider Updated Branches: refs/heads/develop 1d11d626c -> e74e7fe08
SLIDER-630. slider-agent unit tests fail on debian and suse Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/e74e7fe0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/e74e7fe0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/e74e7fe0 Branch: refs/heads/develop Commit: e74e7fe08ba12d73e277303863a8f0eb728cef02 Parents: 1d11d62 Author: Sumit Mohanty <smoha...@hortonworks.com> Authored: Sat Nov 8 13:53:40 2014 -0800 Committer: Sumit Mohanty <smoha...@hortonworks.com> Committed: Sat Nov 8 13:53:40 2014 -0800 ---------------------------------------------------------------------- slider-agent/pom.xml | 2 +- slider-agent/src/test/python/python-wrap | 40 ++++++++++++++++++++++ slider-agent/src/test/python/python-wrap.sh | 42 ------------------------ 3 files changed, 41 insertions(+), 43 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e74e7fe0/slider-agent/pom.xml ---------------------------------------------------------------------- diff --git a/slider-agent/pom.xml b/slider-agent/pom.xml index 14c7be4..bcfc209 100644 --- a/slider-agent/pom.xml +++ b/slider-agent/pom.xml @@ -63,7 +63,7 @@ <executions> <execution> <configuration> - <executable>python</executable> + <executable>${project.basedir}/../slider-agent/src/test/python/python-wrap</executable> <workingDirectory>src/test/python</workingDirectory> <arguments> <argument>unitTests.py</argument> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e74e7fe0/slider-agent/src/test/python/python-wrap ---------------------------------------------------------------------- diff --git a/slider-agent/src/test/python/python-wrap b/slider-agent/src/test/python/python-wrap new file mode 100755 index 0000000..ea57721 --- /dev/null +++ b/slider-agent/src/test/python/python-wrap @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# Copyright 2011 The Apache Software Foundation +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +export PYTHONPATH=/usr/lib/python2.6/site-packages:$PYTHONPATH + +# reset settings +unset PYTHON + +# checking for preferable python versions +if [ -a /usr/bin/python2.7 ] && [ -z "$PYTHON" ]; then + PYTHON=/usr/bin/python2.7 +fi + +if [ -a /usr/bin/python2.6 ] && [ -z "$PYTHON" ]; then + PYTHON=/usr/bin/python2.6 +fi + +# if no preferable python versions found, try to use system one +if [[ -z "$PYTHON" ]]; then + PYTHON=/usr/bin/python +fi + +# execute script +$PYTHON "$@" http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/e74e7fe0/slider-agent/src/test/python/python-wrap.sh ---------------------------------------------------------------------- diff --git a/slider-agent/src/test/python/python-wrap.sh b/slider-agent/src/test/python/python-wrap.sh deleted file mode 100755 index 8f30d67..0000000 --- a/slider-agent/src/test/python/python-wrap.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2011 The Apache Software Foundation -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -export PYTHONPATH=/usr/lib/python2.7/site-packages/common_functions:$PYTHONPATH - -# reset settings -unset PYTHON - -# checking for preferable python versions -if [ -a /usr/bin/python2.7 ] && [ -z "$PYTHON" ]; then - PYTHON=/usr/bin/python2.7 - export PYTHONPATH=/usr/lib/python2.7/site-packages/common_functions:$PYTHONPATH -fi - -if [ -a /usr/bin/python2.6 ] && [ -z "$PYTHON" ]; then - PYTHON=/usr/bin/python2.6 - export PYTHONPATH=/usr/lib/python2.6/site-packages/common_functions:$PYTHONPATH -fi - -# if no preferable python versions found, try to use system one -if [[ -z "$PYTHON" ]]; then - PYTHON=/usr/bin/python -fi - -# execute script -$PYTHON "$@"