-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci, sival] Add azure & Github CI testplan validation job on PR
Add an azure CI quick lint job step, and a Github Actions quick lint job step, which will ensure that testplans are formatted correctly by running the corresponding validation script, currently set to run on both the `hw/top_earlgrey/data` and `hw/top_earlgrey/data/ip` directories. This is also added to the `ci/jobs/quick-lint.sh` job so that it can easily be run locally. This is added to both azure and Github Actions as at present both of these jobs still exist as a result of the partial CI migration from Azure pipelines to Github Actions. Signed-off-by: Alex Jones <[email protected]>
- Loading branch information
1 parent
c5ce570
commit 6819083
Showing
4 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# Copyright lowRISC contributors (OpenTitan project). | ||
# Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Use a JSON schema to validate the testplan hjson files have the correct structure. | ||
|
||
set -e | ||
|
||
dirs_with_testplan_files=( | ||
"hw/top_earlgrey/data" | ||
"hw/top_earlgrey/data/ip" | ||
) | ||
testplan_schema="hw/lint/sival_testplan_schema.hjson" | ||
|
||
for dir in "${dirs_with_testplan_files[@]}"; do | ||
echo "Validating testplans under $dir:" | ||
util/validate_testplans.py --dir "$dir" --schema "$testplan_schema" || { | ||
echo -n "##vso[task.logissue type=error]" | ||
echo "Failed testplan validation in ${dir}." | ||
echo "::error::Failed testplan validation in ${dir}." | ||
exit 1 | ||
} | ||
done | ||
|
||
exit 0 |