git commit: SLIDER-401 agent tests on windows
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-401_slider-agent_tests_on_windows a9f0b985d -> ce3f7009e 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/feature/SLIDER-401_slider-agent_tests_on_windows Commit: ce3f7009e6e9fec204b264a9577a52632b9f3487 Parents: a9f0b98 Author: Steve Loughran Authored: Fri Sep 5 13:47:50 2014 +0100 Committer: Steve Loughran 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')
git commit: SLIDER-401 agent tests on windows
Repository: incubator-slider Updated Branches: refs/heads/feature/SLIDER-401_slider-agent_tests_on_windows ce3f7009e -> b323df811 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/feature/SLIDER-401_slider-agent_tests_on_windows Commit: b323df811a138a0880b60be95d9150419d1dcb85 Parents: ce3f700 Author: Steve Loughran Authored: Fri Sep 5 13:53:05 2014 +0100 Committer: Steve Loughran 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)
[2/4] git commit: SLIDER-401 agent tests on windows
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 Authored: Fri Sep 5 13:47:50 2014 +0100 Committer: Steve Loughran 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
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 Authored: Fri Sep 5 13:53:05 2014 +0100 Committer: Steve Loughran 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)
[45/50] git commit: SLIDER-401 agent tests on windows
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/feature/update_storm_for_93 Commit: b323df811a138a0880b60be95d9150419d1dcb85 Parents: ce3f700 Author: Steve Loughran Authored: Fri Sep 5 13:53:05 2014 +0100 Committer: Steve Loughran 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)
[44/50] git commit: SLIDER-401 agent tests on windows
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/feature/update_storm_for_93 Commit: ce3f7009e6e9fec204b264a9577a52632b9f3487 Parents: a9f0b98 Author: Steve Loughran Authored: Fri Sep 5 13:47:50 2014 +0100 Committer: Steve Loughran 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')
[17/27] git commit: SLIDER-401 agent tests on windows
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/feature/SLIDER-280_Restart_AM_fun_tests Commit: b323df811a138a0880b60be95d9150419d1dcb85 Parents: ce3f700 Author: Steve Loughran Authored: Fri Sep 5 13:53:05 2014 +0100 Committer: Steve Loughran 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)
[16/27] git commit: SLIDER-401 agent tests on windows
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/feature/SLIDER-280_Restart_AM_fun_tests Commit: ce3f7009e6e9fec204b264a9577a52632b9f3487 Parents: a9f0b98 Author: Steve Loughran Authored: Fri Sep 5 13:47:50 2014 +0100 Committer: Steve Loughran 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')
[44/47] git commit: SLIDER-401 agent tests on windows
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/feature/SLIDER-149_Support_a_YARN_service_registry Commit: b323df811a138a0880b60be95d9150419d1dcb85 Parents: ce3f700 Author: Steve Loughran Authored: Fri Sep 5 13:53:05 2014 +0100 Committer: Steve Loughran 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)
[43/47] git commit: SLIDER-401 agent tests on windows
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/feature/SLIDER-149_Support_a_YARN_service_registry Commit: ce3f7009e6e9fec204b264a9577a52632b9f3487 Parents: a9f0b98 Author: Steve Loughran Authored: Fri Sep 5 13:47:50 2014 +0100 Committer: Steve Loughran 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')