mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 14:30:30 +03:00
support Java 20, which is already in Debian/unstable, closes #1070
This commit is contained in:
parent
6c76b8ef87
commit
f468270aa8
2 changed files with 36 additions and 17 deletions
|
|
@ -2262,6 +2262,24 @@ class CommonTest(unittest.TestCase):
|
|||
{'r10e': r10e, 'r17c': ndk_bundle, 'r21e': r21e}, config['ndk_paths']
|
||||
)
|
||||
|
||||
@unittest.skipIf(not os.path.isdir('/usr/lib/jvm/default-java'), 'uses Debian path')
|
||||
def test_fill_config_defaults_java(self):
|
||||
"""Test the auto-detection of Java installed in standard paths"""
|
||||
config = {'sdk_path': self.tmpdir}
|
||||
fdroidserver.common.fill_config_defaults(config)
|
||||
java_paths = []
|
||||
# use presence of javac to make sure its JDK not just JRE
|
||||
for f in glob.glob('/usr/lib/jvm/java-*-openjdk-amd64/bin/javac'):
|
||||
jdk = os.path.dirname(os.path.dirname(f))
|
||||
if not os.path.islink(jdk):
|
||||
java_paths.append(jdk)
|
||||
self.assertEqual(
|
||||
len(java_paths),
|
||||
len(config['java_paths'])
|
||||
)
|
||||
for f in config['java_paths'].values():
|
||||
self.assertTrue(f in java_paths)
|
||||
|
||||
def test_vcs_git_latesttags(self):
|
||||
tags = [
|
||||
"1.1.1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue