Merge branch 'remove-force_build_tools' into 'master'

Remove force_build_tools config option

Closes #738

See merge request fdroid/fdroidserver!797
This commit is contained in:
Michael Pöhn 2020-09-16 16:58:43 +00:00
commit 69e4d48924
6 changed files with 0 additions and 30 deletions

1
.gitignore vendored
View File

@ -24,7 +24,6 @@ README.rst
# files generated by tests
tmp/
/tests/repo/icons*
/tests/repo/latestapps.dat
/tests/repo/status
# files used in manual testing

View File

@ -36,10 +36,6 @@
# Build tools version to be used
# build_tools = "28.0.3"
# Force all build to use the above version of build -tools, good for testing
# builds without having all of the possible build-tools installed.
# force_build_tools = True
# Command or path to binary for running Ant
# ant = "ant"

View File

@ -442,11 +442,6 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
gradletasks += ['assemble' + flavours_cmd + 'Release']
if config['force_build_tools']:
force_gradle_build_tools(build_dir, config['build_tools'])
for name, number, libpath in srclibpaths:
force_gradle_build_tools(libpath, config['build_tools'])
cmd = [config['gradle']]
if build.gradleprops:
cmd += ['-P' + kv for kv in build.gradleprops]

View File

@ -115,7 +115,6 @@ default_config = {
},
'cachedir': os.path.join(os.getenv('HOME'), '.cache', 'fdroidserver'),
'build_tools': MINIMUM_AAPT_BUILD_TOOLS_VERSION,
'force_build_tools': False,
'java_paths': None,
'scan_binary': False,
'ant': "ant",

View File

@ -6,7 +6,6 @@ import inspect
import logging
import optparse
import os
import re
import shutil
import sys
import tempfile
@ -59,22 +58,6 @@ class BuildTest(unittest.TestCase):
os.makedirs(self.tmpdir)
os.chdir(self.basedir)
def test_force_gradle_build_tools(self):
testdir = tempfile.mkdtemp(prefix=inspect.currentframe().f_code.co_name, dir=self.tmpdir)
shutil.copytree(os.path.join('source-files'),
os.path.join(testdir, 'source-files'))
teststring = 'FAKE_VERSION_FOR_TESTING'
fdroidserver.build.force_gradle_build_tools(testdir, teststring)
pattern = re.compile(r"buildToolsVersion[\s=]+'%s'\s+" % teststring)
for p in ('source-files/fdroid/fdroidclient/build.gradle',
'source-files/Zillode/syncthing-silk/build.gradle',
'source-files/open-keychain/open-keychain/build.gradle',
'source-files/osmandapp/osmand/build.gradle',
'source-files/open-keychain/open-keychain/OpenKeychain/build.gradle'):
with open(os.path.join(testdir, p), 'r') as f:
filedata = f.read()
self.assertIsNotNone(pattern.search(filedata))
def test_get_apk_metadata(self):
config = dict()
fdroidserver.common.fill_config_defaults(config)

View File

@ -212,8 +212,6 @@ git clean -fdx
# stick with known working commit, in case future commits break things for this code
git reset --hard fea54e1161d5eb9eb1a54e26253ef84d3ab63705
if [ -d $ANDROID_HOME/platforms/android-23 && -d $ANDROID_HOME/build-tools/23.0.3 ]; then
echo "build_tools = '`ls -1 $ANDROID_HOME/build-tools/ | sort -n | tail -1`'" > config.py
echo "force_build_tools = True" >> config.py
$fdroid build --verbose org.fdroid.ci.test.app:300
else
echo 'WARNING: Skipping "fdroid build" test since android-23 is missing!'