mirror of
https://github.com/anrieff/libcpuid
synced 2025-10-03 11:01:30 +00:00
Tests: fix path for cpuid_tool
When we use CMake, the 'cpuid_tool' binary is in the 'build' directory
This commit is contained in:
parent
04c3ebe0e9
commit
d60503c211
2 changed files with 29 additions and 5 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
TESTS_DIR="$(dirname "$(realpath "$0")")"
|
||||
LIBCPUID_DIR="$(dirname "$TESTS_DIR")"
|
||||
LIBCPUID_CPUID_TOOL="$(find "$LIBCPUID_DIR" -name cpuid_tool -type f)"
|
||||
LIBCPUID_CREATE_TEST="$(find "$LIBCPUID_DIR" -name create_test.py -type f)"
|
||||
|
||||
test_files=$(find "$TESTS_DIR" -name '*.test')
|
||||
for test_file in $test_files; do
|
||||
|
@ -13,7 +15,7 @@ for test_file in $test_files; do
|
|||
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"
|
||||
"$LIBCPUID_CPUID_TOOL" --load="$TMP_DIR/raw.txt" --report > "$TMP_DIR/report.txt"
|
||||
"$LIBCPUID_CREATE_TEST" "$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