cargo2android: reorder TEST_MAPPING statements

"host: true" entry should go before "name:" to match the output of
json writers which sort by alphabetical order. This will help and
avoid unnecesary changes when adding new tests to TEST_MAPPING - e.g.
aosp/1488728

Bug: 168167373
Test: cargo2android.py --run --tests
verify output

Change-Id: Id346a7f8a2cd910115e7fcc448c589363209bee9
This commit is contained in:
Jeff Vander Stoep
2020-11-05 16:13:36 +01:00
parent bfedfc2ade
commit d11be480f3

View File

@@ -203,11 +203,10 @@ class TestMapping(object):
if not is_first: # add comma and '\n' after the previous entry if not is_first: # add comma and '\n' after the previous entry
outf.write(',\n') outf.write(',\n')
is_first = False is_first = False
outf.write(' {\n "name": "' + name + '"') outf.write(' {\n')
if host: if host:
outf.write(',\n "host": true\n }') outf.write(' "host": true,\n')
else: outf.write(' "name": "' + name + '"' + '\n }')
outf.write('\n }')
outf.write('\n ]\n}\n') outf.write('\n ]\n}\n')