c2a: Parse new cargo output
Cargo now outputs
'unittests src/lib.rs'
where before it output
'unittests'.
Bug: 246384761
Test: Add "test": true to argh_derive, regenerate, observe same bp file
Change-Id: Ieeab83761f5fe7cff88af1ce8293818736a6bb9b
diff --git a/scripts/cargo2android.py b/scripts/cargo2android.py
index 48158fd..9f116b3 100755
--- a/scripts/cargo2android.py
+++ b/scripts/cargo2android.py
@@ -1547,7 +1547,7 @@
return ''
def add_empty_test(self, name):
- if name == 'unittests':
+ if name.startswith('unittests'):
self.empty_unittests = True
else:
self.empty_tests.add(name)