Skip to content

Commit

Permalink
Added stub support for TinderboxScraper (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebelhom committed Nov 17, 2013
1 parent 6f9cf9e commit 8250020
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mozdownload/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,14 +702,15 @@ def binary_regex(self):
'linux64': r'.*\.%(EXT)s$',
'mac': r'.*\.%(EXT)s$',
'mac64': r'.*\.%(EXT)s$',
'win32': r'.*(\.installer)\.%(EXT)s$',
'win64': r'.*(\.installer)\.%(EXT)s$'}
'win32': r'.*(\.installer%(STUB)s)\.%(EXT)s$',
'win64': r'.*(\.installer%(STUB)s)\.%(EXT)s$'}

regex = regex_base_name + regex_suffix[self.platform]

return regex % {'APP': self.application,
'LOCALE': self.locale,
'PLATFORM': PLATFORM_FRAGMENTS[self.platform],
'STUB': '-stub' if self.is_stub_installer else '',
'EXT': self.extension}

def build_filename(self, binary):
Expand Down
7 changes: 7 additions & 0 deletions tests/tinderbox_scraper/test_tinderbox_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
'target': 'mozilla-central-firefox-25.0a1.en-US.win32.installer.exe',
'target_url': 'firefox/tinderbox-builds/mozilla-central-win32/'
'1374583608/firefox-25.0a1.en-US.win32.installer.exe'},
# -a firefox -p win32 --stub
{'args': {'application': 'firefox',
'platform': 'win32',
'is_stub_installer': True},
'target': 'mozilla-central-firefox-25.0a1.en-US.win32.installer-stub.exe',
'target_url': 'firefox/tinderbox-builds/mozilla-central-win32/'
'1374583608/firefox-25.0a1.en-US.win32.installer-stub.exe'},
# -a firefox -p linux --branch=mozilla-central
{'args': {'branch': 'mozilla-central',
'platform': 'linux'},
Expand Down

0 comments on commit 8250020

Please sign in to comment.