commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/8cb49d27d1a4/ changeset: 8cb49d27d1a4 user: lance_parsons date: 2012-12-07 23:22:48 summary: Fix for finding test-data for installed tools See bug: https://trello.com/c/Z0vhJEq6 affected #: 1 file diff -r 2f45da781f926f667dd90ad23d23fd123716a535 -r 8cb49d27d1a4c681eb774ac020d524258709ce20 scripts/functional_tests.py --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -57,8 +57,10 @@ last_galaxy_test_file_dir = None last_tested_repository_name = None last_tested_changeset_revision = None + tool_path = None tree = util.parse_xml( config ) root = tree.getroot() + tool_path = root.get('tool_path') for elem in root: if elem.tag == 'tool': galaxy_test_file_dir, \ @@ -66,7 +68,8 @@ last_tested_changeset_revision = get_installed_repository_info( elem, last_galaxy_test_file_dir, last_tested_repository_name, - last_tested_changeset_revision ) + last_tested_changeset_revision, + tool_path ) if galaxy_test_file_dir: if galaxy_test_file_dir != last_galaxy_test_file_dir: if not os.path.isabs( galaxy_test_file_dir ): @@ -82,7 +85,8 @@ last_tested_changeset_revision = get_installed_repository_info( section_elem, last_galaxy_test_file_dir, last_tested_repository_name, - last_tested_changeset_revision ) + last_tested_changeset_revision, + tool_path ) if galaxy_test_file_dir: if galaxy_test_file_dir != last_galaxy_test_file_dir: if not os.path.isabs( galaxy_test_file_dir ): @@ -92,7 +96,7 @@ last_galaxy_test_file_dir = galaxy_test_file_dir return shed_tools_dict -def get_installed_repository_info( elem, last_galaxy_test_file_dir, last_tested_repository_name, last_tested_changeset_revision ): +def get_installed_repository_info( elem, last_galaxy_test_file_dir, last_tested_repository_name, last_tested_changeset_revision, tool_path ): """ Return the GALAXY_TEST_FILE_DIR, the containing repository name and the change set revision for the tool elem. This only happens when testing tools installed from the tool shed. @@ -107,7 +111,7 @@ if repository_name != last_tested_repository_name or changeset_revision != last_tested_changeset_revision: # Locate the test-data directory. installed_tool_path = os.path.join( installed_tool_path_items[ 0 ], 'repos', repository_owner, repository_name, changeset_revision ) - for root, dirs, files in os.walk( installed_tool_path ): + for root, dirs, files in os.walk( os.path.join(tool_path, installed_tool_path )): if 'test-data' in dirs: return os.path.join( root, 'test-data' ), repository_name, changeset_revision return None, repository_name, changeset_revision https://bitbucket.org/galaxy/galaxy-central/changeset/c8f0ea550d51/ changeset: c8f0ea550d51 user: greg date: 2012-12-08 01:09:00 summary: Merged in lance_parsons/galaxy-central_installed-tools-functional-tests-fix (pull request #95) affected #: 1 file diff -r 6f3266a589e397cbdbe8efe4f4d26b7dcdc8924c -r c8f0ea550d51b2c203f5f60568817164c62220fd scripts/functional_tests.py --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -57,8 +57,10 @@ last_galaxy_test_file_dir = None last_tested_repository_name = None last_tested_changeset_revision = None + tool_path = None tree = util.parse_xml( config ) root = tree.getroot() + tool_path = root.get('tool_path') for elem in root: if elem.tag == 'tool': galaxy_test_file_dir, \ @@ -66,7 +68,8 @@ last_tested_changeset_revision = get_installed_repository_info( elem, last_galaxy_test_file_dir, last_tested_repository_name, - last_tested_changeset_revision ) + last_tested_changeset_revision, + tool_path ) if galaxy_test_file_dir: if galaxy_test_file_dir != last_galaxy_test_file_dir: if not os.path.isabs( galaxy_test_file_dir ): @@ -82,7 +85,8 @@ last_tested_changeset_revision = get_installed_repository_info( section_elem, last_galaxy_test_file_dir, last_tested_repository_name, - last_tested_changeset_revision ) + last_tested_changeset_revision, + tool_path ) if galaxy_test_file_dir: if galaxy_test_file_dir != last_galaxy_test_file_dir: if not os.path.isabs( galaxy_test_file_dir ): @@ -92,7 +96,7 @@ last_galaxy_test_file_dir = galaxy_test_file_dir return shed_tools_dict -def get_installed_repository_info( elem, last_galaxy_test_file_dir, last_tested_repository_name, last_tested_changeset_revision ): +def get_installed_repository_info( elem, last_galaxy_test_file_dir, last_tested_repository_name, last_tested_changeset_revision, tool_path ): """ Return the GALAXY_TEST_FILE_DIR, the containing repository name and the change set revision for the tool elem. This only happens when testing tools installed from the tool shed. @@ -107,7 +111,7 @@ if repository_name != last_tested_repository_name or changeset_revision != last_tested_changeset_revision: # Locate the test-data directory. installed_tool_path = os.path.join( installed_tool_path_items[ 0 ], 'repos', repository_owner, repository_name, changeset_revision ) - for root, dirs, files in os.walk( installed_tool_path ): + for root, dirs, files in os.walk( os.path.join(tool_path, installed_tool_path )): if 'test-data' in dirs: return os.path.join( root, 'test-data' ), repository_name, changeset_revision return None, repository_name, changeset_revision Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket