1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00
workload-automation/dev_scripts/get_apk_versions
2015-03-10 13:09:31 +00:00

26 lines
794 B
Python
Executable File

#!/usr/bin/env python
import os
import sys
import argparse
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from wlauto.exceptions import WAError
from wlauto.utils.misc import write_table
from distmanagement.apk import get_aapt_path, get_apk_versions
if __name__ == '__main__':
try:
aapt = get_aapt_path()
parser = argparse.ArgumentParser()
parser.add_argument('path', metavar='PATH', help='Location to look for APKs.')
args = parser.parse_args()
versions = get_apk_versions(args.path, aapt)
write_table([v.to_tuple() for v in versions], sys.stdout,
align='<<<>>', headers=['path', 'package', 'name', 'version code', 'version name'])
except WAError, e:
logging.error(e)
sys.exit(1)