Skip to content

Commit

Permalink
[rom_ext] Update ownership transfer testplan
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Frantz <[email protected]>
(cherry picked from commit ad27075)
  • Loading branch information
cfrantz committed Oct 25, 2024
1 parent 2c766ab commit 534b21d
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 8 deletions.
56 changes: 53 additions & 3 deletions sw/device/silicon_creator/rom_ext/data/rom_ext_e2e_testplan.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Component:RomExt/E2e/Test
]
project: OpenTitan
milestone: "Earlgrey ES ROM_EXT"
milestone: Earlgrey-PROD.ROM_EXT
priority: P1
}
testpoints:
Expand Down Expand Up @@ -216,7 +216,6 @@
url: https://github.com/lowRISC/opentitan/issues/20247
}
}

{
name: rom_ext_e2e_transfer_any_test
desc:
Expand All @@ -236,6 +235,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24465
}
}
{
name: rom_ext_e2e_bad_unlock_test
Expand All @@ -254,6 +257,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24466
}
}
{
name: rom_ext_e2e_bad_activate_test
Expand All @@ -274,6 +281,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24467
}
}
{
name: rom_ext_e2e_bad_owner_block_test
Expand All @@ -294,6 +305,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24468
}
}
{
name: rom_ext_e2e_bad_app_key_test
Expand All @@ -314,6 +329,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24469
}
}
{
name: rom_ext_e2e_transfer_endorsed_test
Expand All @@ -334,6 +353,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24470
}
}
{
name: rom_ext_e2e_bad_endorsee_test
Expand All @@ -354,6 +377,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24471
}
}
{
name: rom_ext_e2e_locked_update_test
Expand All @@ -374,6 +401,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24472
}
}
{
name: rom_ext_e2e_bad_locked_update_test
Expand All @@ -395,6 +426,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24473
}
}
{
name: rom_ext_e2e_rescue_limit_test
Expand All @@ -416,6 +451,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24474
}
}
{
name: rom_ext_e2e_rescue_permission_test
Expand All @@ -437,6 +476,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24475
}
}
{
name: rom_ext_e2e_flash_permission_test
Expand All @@ -462,6 +505,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24476
}
}
{
name: rom_ext_e2e_info_permission_test
Expand All @@ -482,7 +529,10 @@
]
stage: V3
tests: []
github:
{
url: https://github.com/lowRISC/opentitan/issues/24477
}
}

]
}
21 changes: 16 additions & 5 deletions util/py/scripts/gh_testplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')


Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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__':
Expand Down

0 comments on commit 534b21d

Please sign in to comment.