Remove GTS-Verifier license check
The whole GTS-Verifier will be removed. Before that, remove GTS-V license check first. Ignore-AOSP-First: This CL must be submit with other CLs in the topic to avoid breaking the test. This CL will be cherry pick to AOSP after submitting. Bug: 283384166 Test: m gts Change-Id: I5bc8c1f4609f55cedd5bfbed014b65de164e2b16
This commit is contained in:
parent
98b4c2d908
commit
58c428e336
1 changed files with 1 additions and 26 deletions
|
@ -18,14 +18,12 @@ Checks and generates a report for gts modules that should be open-sourced.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
generate_gts_open_source_report.py
|
generate_gts_open_source_report.py
|
||||||
--gtsv-metalic [gts-verifier meta_lic]
|
|
||||||
--gts-test-metalic [android-gts meta_lic]
|
--gts-test-metalic [android-gts meta_lic]
|
||||||
--checkshare [COMPLIANCE_CHECKSHARE]
|
--checkshare [COMPLIANCE_CHECKSHARE]
|
||||||
--gts-test-dir [directory of android-gts]
|
--gts-test-dir [directory of android-gts]
|
||||||
--output [output file]
|
--output [output file]
|
||||||
|
|
||||||
Output example:
|
Output example:
|
||||||
GTS-Verifier: PASS/FAIL
|
|
||||||
GTS-Modules: PASS/FAIL
|
GTS-Modules: PASS/FAIL
|
||||||
GtsIncrementalInstallTestCases_BackgroundProcess
|
GtsIncrementalInstallTestCases_BackgroundProcess
|
||||||
GtsUnsignedNetworkStackTestCases
|
GtsUnsignedNetworkStackTestCases
|
||||||
|
@ -38,9 +36,6 @@ import re
|
||||||
def _get_args():
|
def _get_args():
|
||||||
"""Parses input arguments."""
|
"""Parses input arguments."""
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument(
|
|
||||||
'--gtsv-metalic', required=True,
|
|
||||||
help='license meta_lic file path of gts-verifier.zip')
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--gts-test-metalic', required=True,
|
'--gts-test-metalic', required=True,
|
||||||
help='license meta_lic file path of android-gts.zip')
|
help='license meta_lic file path of android-gts.zip')
|
||||||
|
@ -55,23 +50,6 @@ def _get_args():
|
||||||
help='file path of the output report')
|
help='file path of the output report')
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
def _check_gtsv(checkshare: str, gtsv_metalic: str) -> str:
|
|
||||||
"""Checks gts-verifier license.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
checkshare: path of the COMPLIANCE_CHECKSHARE tool
|
|
||||||
gtsv_metalic: license meta_lic file path of gts-verifier.zip
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
PASS when gts-verifier.zip doesn't need to be shared, and FAIL
|
|
||||||
when gts-verifier.zip need to be shared.
|
|
||||||
"""
|
|
||||||
cmd = f'{checkshare} {gtsv_metalic}'
|
|
||||||
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.PIPE)
|
|
||||||
proc.communicate()
|
|
||||||
return 'PASS' if proc.returncode == 0 else 'FAIL'
|
|
||||||
|
|
||||||
def _check_gts_test(checkshare: str, gts_test_metalic: str,
|
def _check_gts_test(checkshare: str, gts_test_metalic: str,
|
||||||
gts_test_dir: str) -> tuple[str, set[str]]:
|
gts_test_dir: str) -> tuple[str, set[str]]:
|
||||||
"""Checks android-gts license.
|
"""Checks android-gts license.
|
||||||
|
@ -109,15 +87,12 @@ def _check_gts_test(checkshare: str, gts_test_metalic: str,
|
||||||
def main(argv):
|
def main(argv):
|
||||||
args = _get_args()
|
args = _get_args()
|
||||||
|
|
||||||
gtsv_metalic = args.gtsv_metalic
|
|
||||||
gts_test_metalic = args.gts_test_metalic
|
gts_test_metalic = args.gts_test_metalic
|
||||||
output_file = args.output
|
output_file = args.output
|
||||||
checkshare = args.checkshare
|
checkshare = args.checkshare
|
||||||
gts_test_dir = args.gts_test_dir
|
gts_test_dir = args.gts_test_dir
|
||||||
|
|
||||||
with open(output_file, 'w') as file:
|
with open(output_file, 'w') as file:
|
||||||
result = _check_gtsv(checkshare, gtsv_metalic)
|
|
||||||
file.write(f'GTS-Verifier: {result}\n')
|
|
||||||
result, open_source_modules = _check_gts_test(
|
result, open_source_modules = _check_gts_test(
|
||||||
checkshare, gts_test_metalic, gts_test_dir)
|
checkshare, gts_test_metalic, gts_test_dir)
|
||||||
file.write(f'GTS-Modules: {result}\n')
|
file.write(f'GTS-Modules: {result}\n')
|
||||||
|
@ -125,4 +100,4 @@ def main(argv):
|
||||||
file.write(f'\t{open_source_module}\n')
|
file.write(f'\t{open_source_module}\n')
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(sys.argv)
|
main(sys.argv)
|
||||||
|
|
Loading…
Reference in a new issue