mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
build: improve regsub pattern for setting buildToolsVersion
This addresses the discussion in !64 https://gitlab.com/fdroid/fdroidserver/merge_requests/64 Sometimes, buildToolsVersion is a kind of gradle macro call, and other times it is a variable assignment. This regsub pattern now handles both of those cases.
This commit is contained in:
parent
6db6433e97
commit
d53a5af715
10 changed files with 717 additions and 8 deletions
|
|
@ -7,7 +7,9 @@ import inspect
|
|||
import optparse
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
localmodule = os.path.realpath(os.path.join(
|
||||
|
|
@ -100,7 +102,15 @@ class CommonTest(unittest.TestCase):
|
|||
def test_prepare_sources(self):
|
||||
testint = 99999999
|
||||
teststr = 'FAKE_STR_FOR_TESTING'
|
||||
testdir = os.path.dirname(__file__)
|
||||
|
||||
tmpdir = os.path.join(os.path.dirname(__file__), '..', '.testfiles')
|
||||
if not os.path.exists(tmpdir):
|
||||
os.makedirs(tmpdir)
|
||||
tmptestsdir = tempfile.mkdtemp(prefix='test_prepare_sources', dir=tmpdir)
|
||||
shutil.copytree(os.path.join(os.path.dirname(__file__), 'source-files'),
|
||||
os.path.join(tmptestsdir, 'source-files'))
|
||||
|
||||
testdir = os.path.join(tmptestsdir, 'source-files', 'fdroid', 'fdroidclient')
|
||||
|
||||
config = dict()
|
||||
config['sdk_path'] = os.getenv('ANDROID_HOME')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue