You've already forked open-source-firmware-validation
mirror of
https://github.com/Dasharo/open-source-firmware-validation.git
synced 2026-03-06 14:51:55 -08:00
b18a804194
Can be used to check whether test cases in source files and their copy in `test_cases.json` are in sync. Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
20 lines
456 B
Bash
Executable File
20 lines
456 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# SPDX-FileCopyrightText: 2024 3mdeb <contact@3mdeb.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# -r - produce raw output, don't escape special characters and don't quote
|
|
# For each doc, produce line containing:
|
|
# - "_id DEPRECATED" if doc has `changed_to` field
|
|
# - "_id name" otherwise
|
|
jq -r '
|
|
.[].doc |
|
|
._id + " " +
|
|
if has("changed_to") then
|
|
"DEPRECATED"
|
|
else
|
|
.name
|
|
end
|
|
' test_cases.json
|