c2a: Fix rust_version calculation
string-typed result groups would cause the comparison to fail with a type error. Explicitly casting results to integer for comparison, then back to string for concatenation causes things to work again. Bug: 234744235 Test: Run tool with no --cargo_bin option (and the following patch) (thus using local cargo version detection) and observe success. Change-Id: I91d8de925c1b6eca7c9905ea85e1ad90e01fb1f9
This commit is contained in:
@@ -1205,10 +1205,10 @@ class Runner(object):
|
||||
result = version_pat.match(dir_name)
|
||||
if not result:
|
||||
continue
|
||||
version = (result.group(1), result.group(2), result.group(3))
|
||||
version = (int(result.group(1)), int(result.group(2)), int(result.group(3)))
|
||||
if version > rust_version:
|
||||
rust_version = version
|
||||
return '.'.join(rust_version)
|
||||
return '.'.join(map(str, rust_version))
|
||||
|
||||
def find_out_files(self):
|
||||
# list1 has build.rs output for normal crates
|
||||
|
||||
Reference in New Issue
Block a user