From 534b21d5590378f6ea1a1c789dd88b453d7702c3 Mon Sep 17 00:00:00 2001 From: Chris Frantz Date: Fri, 30 Aug 2024 10:34:17 -0700 Subject: [PATCH] [rom_ext] Update ownership transfer testplan Signed-off-by: Chris Frantz (cherry picked from commit ad27075f9312c6275e01b3433054f64131dc302e) --- .../rom_ext/data/rom_ext_e2e_testplan.hjson | 56 ++++++++++++++++++- util/py/scripts/gh_testplan.py | 21 +++++-- 2 files changed, 69 insertions(+), 8 deletions(-) diff --git a/sw/device/silicon_creator/rom_ext/data/rom_ext_e2e_testplan.hjson b/sw/device/silicon_creator/rom_ext/data/rom_ext_e2e_testplan.hjson index 483cf6ca71a9b..60716f0e0f412 100644 --- a/sw/device/silicon_creator/rom_ext/data/rom_ext_e2e_testplan.hjson +++ b/sw/device/silicon_creator/rom_ext/data/rom_ext_e2e_testplan.hjson @@ -12,7 +12,7 @@ Component:RomExt/E2e/Test ] project: OpenTitan - milestone: "Earlgrey ES ROM_EXT" + milestone: Earlgrey-PROD.ROM_EXT priority: P1 } testpoints: @@ -216,7 +216,6 @@ url: https://github.com/lowRISC/opentitan/issues/20247 } } - { name: rom_ext_e2e_transfer_any_test desc: @@ -236,6 +235,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24465 + } } { name: rom_ext_e2e_bad_unlock_test @@ -254,6 +257,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24466 + } } { name: rom_ext_e2e_bad_activate_test @@ -274,6 +281,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24467 + } } { name: rom_ext_e2e_bad_owner_block_test @@ -294,6 +305,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24468 + } } { name: rom_ext_e2e_bad_app_key_test @@ -314,6 +329,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24469 + } } { name: rom_ext_e2e_transfer_endorsed_test @@ -334,6 +353,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24470 + } } { name: rom_ext_e2e_bad_endorsee_test @@ -354,6 +377,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24471 + } } { name: rom_ext_e2e_locked_update_test @@ -374,6 +401,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24472 + } } { name: rom_ext_e2e_bad_locked_update_test @@ -395,6 +426,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24473 + } } { name: rom_ext_e2e_rescue_limit_test @@ -416,6 +451,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24474 + } } { name: rom_ext_e2e_rescue_permission_test @@ -437,6 +476,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24475 + } } { name: rom_ext_e2e_flash_permission_test @@ -462,6 +505,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24476 + } } { name: rom_ext_e2e_info_permission_test @@ -482,7 +529,10 @@ ] stage: V3 tests: [] + github: + { + url: https://github.com/lowRISC/opentitan/issues/24477 + } } - ] } diff --git a/util/py/scripts/gh_testplan.py b/util/py/scripts/gh_testplan.py index 6ee967e73ac13..c7e9c3985876d 100755 --- a/util/py/scripts/gh_testplan.py +++ b/util/py/scripts/gh_testplan.py @@ -30,6 +30,10 @@ action=argparse.BooleanOptionalAction, default=True, help='Do not perform any github API actions') +flags.add_argument('--num', + default=None, + type=int, + help="Number of issues to create before exiting") flags.add_argument('testplan', type=str, help='The testplan to process') @@ -145,7 +149,7 @@ def create_issue(self, issue): return self.call(cmd, self.dry_run) -def create_issues(testplan, gh): +def create_issues(testplan, gh, num): """Create issues in the testplan. Creates the issues in the testplan and updates the testplan with the @@ -157,6 +161,7 @@ def create_issues(testplan, gh): gh: GithubApi; a GithubApi instance. """ allowed_labels = gh.get_valid_labels() + n = 0 for key in testplan.keys(): # First get the issue creation template from the testplan # and check if the issue has already been created. @@ -182,17 +187,23 @@ def create_issues(testplan, gh): # Save the testplan so if there is a crash later, we've # recorded that we created this issue. url = gh.create_issue(template) - if 'github' not in testpoint: - testpoint['github'] = {} - testpoint['github']['url'] = url + if url: + url = url.decode('utf-8').strip() + if 'github' not in testpoint: + testpoint['github'] = {} + testpoint['github']['url'] = url + print(f'{testpoint["name"]}: {url}') testplan.save() + n += 1 + if num is not None and n >= num: + break def main(args): gh = GithubApi(args.gh_bin, args.repo, args.dry_run) testplan = Testplan(args.testplan) testplan.load() - create_issues(testplan, gh) + create_issues(testplan, gh, args.num) if __name__ == '__main__':