Skip to content

Commit 881fb4c

Browse files
VladRassokhinnikita-nazarov
authored andcommitted
Minor in test_runner.py: change java bitness function
1 parent 809afc1 commit 881fb4c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test_runner.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def get_java_compiler() -> str:
3030
return os.path.join(JAVA_HOME, 'bin', 'javac')
3131

3232

33-
def get_java_architecture() -> str:
33+
def get_java_bitness() -> int:
3434
out = check_output([get_java_executable(), '-version'], stderr=STDOUT).decode('utf-8')
3535

3636
if out.find('64-Bit') != -1:
37-
return '64bit'
38-
return '32bit'
37+
return 64
38+
return 32
3939

4040

41-
OUTS_DIR = 'outs' if get_java_architecture() == '64bit' else 'outs32'
41+
OUTS_DIR = 'outs' if get_java_bitness() == 64 else 'outs32'
4242

4343

4444
def output_file(name: str, directory: Optional[str] = None) -> str:
@@ -52,7 +52,7 @@ def dynamic_library_name(lib_name) -> str:
5252
def dynamic_lib_format() -> str:
5353
os_type = platform.system()
5454
if os_type == "Windows":
55-
if get_java_architecture() == "32bit":
55+
if get_java_bitness() == 32:
5656
return '{}32.dll'
5757
else:
5858
return '{}.dll'

0 commit comments

Comments
 (0)