Skip to content

Commit

Permalink
tests: add script to regenerate the reference output
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
  • Loading branch information
jluebbe committed Dec 19, 2023
1 parent c958ff7 commit b994aa0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/reference/regenerate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -ex

self="$(realpath "${0}")" && selfdir="$(dirname "${self}")"

cd "${selfdir}"

for json in *.json; do
text="$(basename -s .json "${json}").text"
../../usbsdmux/sd_regs.py --json "${json}" > "${json}.tmp"
../../usbsdmux/sd_regs.py "${json}" > "${text}.tmp"
mv "${json}.tmp" "${json}"
mv "${text}.tmp" "${text}"
done

0 comments on commit b994aa0

Please sign in to comment.