Skip to content

Commit

Permalink
Add verification that patches are applied to asn files, fail script i…
Browse files Browse the repository at this point in the history
…f not
  • Loading branch information
iyourshaw committed Nov 20, 2024
1 parent 784459a commit 63df09f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions asn1c_combined/generate-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 63df09f

Please sign in to comment.