Skip to content

Commit 10a0374

Browse files
committed
output SHA1 for files built during compat tests
This allows for comparing binaries generated on the ESP32 with those generated on the PC with binutils-esp32ulp. During testing on the ESP32, given that there is no binutils-esp32ulp, only the py-esp32-ulp part of the compat tests can run. Calculating the SHA1 for each resulting file from the compat tests, then allows comparing those hashes with hashes calculated on the PC.
1 parent 1c2319c commit 10a0374

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

tests/01_compat_tests.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
set -e
66

7+
calc_file_hash() {
8+
local filename=$1
9+
10+
shasum < $1 | cut -d' ' -f1
11+
}
12+
713
for src_file in $(ls -1 compat/*.S); do
814
src_name="${src_file%.S}"
915

@@ -36,6 +42,6 @@ for src_file in $(ls -1 compat/*.S); do
3642
xxd $bin_file
3743
exit 1
3844
else
39-
echo -e "\tBuild outputs match"
45+
echo -e "\tBuild outputs match (sha1: $(calc_file_hash $ulp_file))"
4046
fi
4147
done

tests/02_compat_rtc_tests.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ build_defines_db() {
5151
esp-idf/components/esp_common/include/*.h 1>$log_file
5252
}
5353

54+
calc_file_hash() {
55+
local filename=$1
56+
57+
shasum < $1 | cut -d' ' -f1
58+
}
59+
5460
patch_test() {
5561
local test_name=$1
5662
local out_file="${test_name}.tmp"
@@ -150,6 +156,6 @@ for src_file in ulptool/src/ulp_examples/*/*.s binutils-esp32ulp/gas/testsuite/g
150156
xxd $bin_file
151157
exit 1
152158
else
153-
echo -e "\tBuild outputs match"
159+
echo -e "\tBuild outputs match (sha1: $(calc_file_hash $ulp_file))"
154160
fi
155161
done

0 commit comments

Comments
 (0)