You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/09/05 15:00:10 UTC

[1/4] git commit: SLIDER-401 slider-agent tests not running on windows

Repository: incubator-slider
Updated Branches:
  refs/heads/develop 2d6331a0e -> f14d32c6f


SLIDER-401 slider-agent tests not running on windows


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/a9f0b985
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/a9f0b985
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/a9f0b985

Branch: refs/heads/develop
Commit: a9f0b985d7bab6387a028df3019d467a69a69626
Parents: 2d6331a
Author: Steve Loughran <st...@apache.org>
Authored: Fri Sep 5 13:15:38 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Sep 5 13:15:38 2014 +0100

----------------------------------------------------------------------
 pom.xml                                     |  1 +
 slider-agent/pom.xml                        |  4 +--
 slider-agent/src/test/python/python-wrap    | 40 ----------------------
 slider-agent/src/test/python/python-wrap.sh | 42 ++++++++++++++++++++++++
 slider-core/pom.xml                         |  4 +--
 5 files changed, 47 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a9f0b985/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9efb5c8..d9b3813 100644
--- a/pom.xml
+++ b/pom.xml
@@ -200,6 +200,7 @@
     <maven-deploy-plugin.version>2.7</maven-deploy-plugin.version>
     <maven-doxia-module-markdown.version>1.4</maven-doxia-module-markdown.version>
     <maven-enforcer-plugin.version>1.0</maven-enforcer-plugin.version>
+    <maven-exec-plugin.version>1.2.1</maven-exec-plugin.version>
     <maven-jar-plugin.version>2.3.1</maven-jar-plugin.version>
     <maven.javadoc.version>2.8</maven.javadoc.version>
     <maven.project.version>2.4</maven.project.version>

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a9f0b985/slider-agent/pom.xml
----------------------------------------------------------------------
diff --git a/slider-agent/pom.xml b/slider-agent/pom.xml
index f26cb11..48dd301 100644
--- a/slider-agent/pom.xml
+++ b/slider-agent/pom.xml
@@ -59,11 +59,11 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>exec-maven-plugin</artifactId>
-        <version>1.2</version>
+        <version>${maven-exec-plugin.version}</version>
         <executions>
           <execution>
             <configuration>
-              <executable>${project.basedir}/src/test/python/python-wrap</executable>
+              <executable>python</executable>
               <workingDirectory>src/test/python</workingDirectory>
               <arguments>
                 <argument>unitTests.py</argument>

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a9f0b985/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
deleted file mode 100755
index 40dc785..0000000
--- a/slider-agent/src/test/python/python-wrap
+++ /dev/null
@@ -1,40 +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.6/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
-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/a9f0b985/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
new file mode 100755
index 0000000..8f30d67
--- /dev/null
+++ b/slider-agent/src/test/python/python-wrap.sh
@@ -0,0 +1,42 @@
+#!/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 "$@"

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/a9f0b985/slider-core/pom.xml
----------------------------------------------------------------------
diff --git a/slider-core/pom.xml b/slider-core/pom.xml
index cdcea38..326af88 100644
--- a/slider-core/pom.xml
+++ b/slider-core/pom.xml
@@ -538,7 +538,7 @@
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>exec-maven-plugin</artifactId>
-            <version>1.2.1</version>
+            <version>${maven-exec-plugin.version}</version>
             <configuration>
               <executable>java</executable>
               <arguments>
@@ -562,7 +562,7 @@
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>exec-maven-plugin</artifactId>
-            <version>1.2.1</version>
+            <version>${maven-exec-plugin.version}</version>
             <executions>
               <execution>
                 <goals>


[2/4] git commit: SLIDER-401 agent tests on windows

Posted by st...@apache.org.
SLIDER-401 agent tests on windows


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/ce3f7009
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/ce3f7009
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/ce3f7009

Branch: refs/heads/develop
Commit: ce3f7009e6e9fec204b264a9577a52632b9f3487
Parents: a9f0b98
Author: Steve Loughran <st...@apache.org>
Authored: Fri Sep 5 13:47:50 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Sep 5 13:47:50 2014 +0100

----------------------------------------------------------------------
 slider-agent/src/main/python/setup.py     |  2 +-
 slider-agent/src/test/python/unitTests.py | 31 ++++++++++++--------------
 2 files changed, 15 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/ce3f7009/slider-agent/src/main/python/setup.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/main/python/setup.py b/slider-agent/src/main/python/setup.py
index 421b5f9..56969b6 100644
--- a/slider-agent/src/main/python/setup.py
+++ b/slider-agent/src/main/python/setup.py
@@ -17,7 +17,7 @@ from setuptools import setup
 
 setup(
     name = "slider-agent",
-    version = "0.31.0-incubating-SNAPSHOT",
+    version = "0.51.0-incubating-SNAPSHOT",
     packages = ['agent'],
     # metadata for upload to PyPI
     author = "Apache Software Foundation",

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/ce3f7009/slider-agent/src/test/python/unitTests.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/test/python/unitTests.py b/slider-agent/src/test/python/unitTests.py
index b01438e..bab121f 100644
--- a/slider-agent/src/test/python/unitTests.py
+++ b/slider-agent/src/test/python/unitTests.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-'''
+"""
 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
@@ -16,14 +16,13 @@ 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.
-'''
+"""
 
 import unittest
-import doctest
-from os.path import dirname, split, isdir
-import logging.handlers
+from os.path import isdir
 import logging
-from random import shuffle
+import os
+import sys
 
 LOG_FILE_NAME='tests.log'
 SELECTED_PREFIX = "_"
@@ -31,9 +30,9 @@ PY_EXT='.py'
 ignoredDirs = ["mock"]
 
 class TestAgent(unittest.TestSuite):
-  def run(self, result):
+  def run(self, result, debug=False):
     run = unittest.TestSuite.run
-    run(self, result)
+    run(self, result, debug)
     return result
 
 
@@ -41,19 +40,19 @@ def parent_dir(path):
   if isdir(path):
     if path.endswith(os.sep):
       path = os.path.dirname(path)
-    parent_dir = os.path.dirname(path)
+    parent = os.path.dirname(path)
   else:
-    parent_dir = os.path.dirname(os.path.dirname(path))
+    parent = os.path.dirname(os.path.dirname(path))
 
-  return parent_dir
+  return parent
 
 
 def all_tests_suite():
-  src_dir = os.getcwd()
+  root_dir = os.getcwd()
   files_list = []
-  for directory in os.listdir(src_dir):
+  for directory in os.listdir(root_dir):
     if os.path.isdir(directory) and not directory in ignoredDirs:
-      files_list += os.listdir(src_dir + os.sep + directory)
+      files_list += os.listdir(root_dir + os.sep + directory)
   ## temporarily deleting to add more predictability
   ## shuffle(files_list)
   files_list.sort()
@@ -99,9 +98,7 @@ def main():
     logger.info('------------------------------------------------------------------------')
 
 if __name__ == '__main__':
-  import os
-  import sys
-  import io
+
   sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
   sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + os.sep + 'main' + os.sep + 'python')
   sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + os.sep + 'main' + os.sep + 'python' + os.sep + 'agent')


[3/4] git commit: SLIDER-401 agent tests on windows

Posted by st...@apache.org.
SLIDER-401 agent tests on windows


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/b323df81
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/b323df81
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/b323df81

Branch: refs/heads/develop
Commit: b323df811a138a0880b60be95d9150419d1dcb85
Parents: ce3f700
Author: Steve Loughran <st...@apache.org>
Authored: Fri Sep 5 13:53:05 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Sep 5 13:53:05 2014 +0100

----------------------------------------------------------------------
 slider-agent/src/test/python/unitTests.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/b323df81/slider-agent/src/test/python/unitTests.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/test/python/unitTests.py b/slider-agent/src/test/python/unitTests.py
index bab121f..6aa0167 100644
--- a/slider-agent/src/test/python/unitTests.py
+++ b/slider-agent/src/test/python/unitTests.py
@@ -70,8 +70,9 @@ def all_tests_suite():
   else:
     for file_name in files_list:
       if file_name.endswith(PY_EXT) and not file_name == __file__:
-        logger.info(file_name)
-        tests_list.append(file_name.replace(PY_EXT, ''))
+        replaced = file_name.replace(PY_EXT, '')
+        logger.info(replaced)
+        tests_list.append(replaced)
   logger.info('------------------------------------------------------------------------')
 
   suite = unittest.TestLoader().loadTestsFromNames(tests_list)


[4/4] git commit: Merge branch 'feature/SLIDER-401_slider-agent_tests_on_windows' into develop

Posted by st...@apache.org.
Merge branch 'feature/SLIDER-401_slider-agent_tests_on_windows' into develop


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/f14d32c6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/f14d32c6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/f14d32c6

Branch: refs/heads/develop
Commit: f14d32c6fac2e252e587dbdc88e0e3e079f44d37
Parents: 2d6331a b323df8
Author: Steve Loughran <st...@apache.org>
Authored: Fri Sep 5 13:59:58 2014 +0100
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Sep 5 13:59:58 2014 +0100

----------------------------------------------------------------------
 pom.xml                                     |  1 +
 slider-agent/pom.xml                        |  4 +--
 slider-agent/src/main/python/setup.py       |  2 +-
 slider-agent/src/test/python/python-wrap    | 40 ----------------------
 slider-agent/src/test/python/python-wrap.sh | 42 ++++++++++++++++++++++++
 slider-agent/src/test/python/unitTests.py   | 36 ++++++++++----------
 slider-core/pom.xml                         |  4 +--
 7 files changed, 65 insertions(+), 64 deletions(-)
----------------------------------------------------------------------