mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
Tests: update all tests to add fields for L1I
This commit is contained in:
parent
e592a83278
commit
fb1deb1fef
106 changed files with 236 additions and 1 deletions
19
tests/update_tests.sh
Executable file
19
tests/update_tests.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
TESTS_DIR="$(dirname "$(realpath "$0")")"
|
||||
LIBCPUID_DIR="$(dirname "$TESTS_DIR")"
|
||||
|
||||
test_files=$(find "$TESTS_DIR" -name '*.test')
|
||||
for test_file in $test_files; do
|
||||
echo "Update ${test_file#"${TESTS_DIR}/"}..."
|
||||
TMP_DIR="$(mktemp --directory --tmpdir libcpuid.XXXXXX)"
|
||||
while IFS= read -r line; do
|
||||
if [[ "$line" = "--------------------------------------------------------------------------------" ]]; then
|
||||
break
|
||||
fi
|
||||
echo "$line" >> "$TMP_DIR/raw.txt"
|
||||
done < "$test_file"
|
||||
"$LIBCPUID_DIR/cpuid_tool/cpuid_tool" --load="$TMP_DIR/raw.txt" --report > "$TMP_DIR/report.txt"
|
||||
"$LIBCPUID_DIR/tests/create_test.py" "$TMP_DIR/raw.txt" "$TMP_DIR/report.txt" > "$test_file"
|
||||
rm -rf "$TMP_DIR"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue