From 63df09f7337dd2d1db0eb723a27edab2347f65bd Mon Sep 17 00:00:00 2001 From: Ivan Yourshaw <39739503+iyourshaw@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:53:19 -0700 Subject: [PATCH] Add verification that patches are applied to asn files, fail script if not --- asn1c_combined/generate-files.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/asn1c_combined/generate-files.sh b/asn1c_combined/generate-files.sh index 61fbe38f..bcbdc2d0 100644 --- a/asn1c_combined/generate-files.sh +++ b/asn1c_combined/generate-files.sh @@ -36,8 +36,25 @@ if [ "$year" == "2024" ]; then patch --binary --backup --forward --reject-file="-" \ ./j2735-asn-files/2024/J3217-TollUsageMsg-2024-rel-v1.1.asn \ ./j2735-asn-files/2024/asn-edits/TollUsageMessage.patch + + # Verify that the patches were applied correctly + if ! grep -q RwmSnapShot ./j2735-asn-files/2024/J2945-3-RoadWeatherMessage-2024-rel-v2.1.asn; then + echo "The patch for the Road Weather Message ASN file was not applied correctly." + exit 1 + fi + + if ! grep -q TumVehicleId ./j2735-asn-files/2024/J3217-R-RoadUserChargingReportMsg-2024-rel-v1.1.asn; then + echo "The patch for the Road User Charging Report Message ASN file was not applied correctly." + exit 1 + fi + + if ! grep -q TumVehicleId ./j2735-asn-files/2024/J3217-TollUsageMsg-2024-rel-v1.1.asn; then + echo "The patch for the Toll Usage Message ASN file was not applied correctly." + exit 1 + fi fi + asn1c -fcompound-names -gen-OER -fincludes-quoted -no-gen-JER -pdu=all \ ./scms-asn-files/*.asn \ ./j2735-asn-files/$year/*.asn \