diff options
author | Manoj Gupta <manojgupta@google.com> | 2016-12-14 11:05:18 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-12-14 13:32:49 -0800 |
commit | 63824523d7f5b3afa6a8e939db3503cf867e7c40 (patch) | |
tree | 5582691f90a14ec066279b2affbdcd044094a501 /generate-waterfall-reports.py | |
parent | e84ea3d3e9fbe92d9854a85d67ab01fb488781c7 (diff) | |
download | toolchain-utils-63824523d7f5b3afa6a8e939db3503cf867e7c40.tar.gz |
Check for prodacess before running waterfall summary report.
Check if prodaccess has not expired. If it is expired,
error out and ask to run prodacess.
BUG=chromium:674218
TEST=Locally tested
Change-Id: I20129c69c17956ed6edda57949ea49546c9b1d85
Reviewed-on: https://chrome-internal-review.googlesource.com/312040
Commit-Ready: Manoj Gupta <manojgupta@google.com>
Tested-by: Manoj Gupta <manojgupta@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'generate-waterfall-reports.py')
-rwxr-xr-x | generate-waterfall-reports.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/generate-waterfall-reports.py b/generate-waterfall-reports.py index 50511f91..47c71724 100755 --- a/generate-waterfall-reports.py +++ b/generate-waterfall-reports.py @@ -578,11 +578,29 @@ def DownloadLogFile(builder, buildnum, test, test_family): return target, build_link +# Check for prodaccess. +def CheckProdAccess(): + status, output, _ = command_executer.GetCommandExecuter().RunCommandWOutput( + 'prodcertstatus') + if status != 0: + return False + # Verify that status is not expired + if 'expires' in output: + return True + return False + + def Main(): """Main function for this script.""" test_data_dict = dict() failure_dict = dict() + + prod_access = CheckProdAccess() + if not prod_access: + print('ERROR: Please run prodaccess first.') + return + with open('%s/waterfall-test-data.json' % DATA_DIR, 'r') as input_file: test_data_dict = json.load(input_file) |