]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Make travis check that msg_targets match the template
authorMatt Corallo <git@bluematt.me>
Sun, 13 May 2018 17:17:18 +0000 (13:17 -0400)
committerMatt Corallo <git@bluematt.me>
Sun, 13 May 2018 17:23:22 +0000 (13:23 -0400)
fuzz/fuzz_targets/msg_targets/gen_target.sh [changed mode: 0644->0755]
fuzz/travis-fuzz.sh

old mode 100644 (file)
new mode 100755 (executable)
index 6a10717..8e9ed04
@@ -1,4 +1,4 @@
-for target in CommitmentSigned FundingCreated FundingLocked FundingSigned OpenChannel RevokeAndACK Shutdown UpdateAddHTLC UpdateFailHTLC UpdateFailMalformedHTLC UpdateFee UpdateFulfillHTLC AcceptChannel ClosingSigned; do 
+for target in CommitmentSigned FundingCreated FundingLocked FundingSigned OpenChannel RevokeAndACK Shutdown UpdateAddHTLC UpdateFailHTLC UpdateFailMalformedHTLC UpdateFee UpdateFulfillHTLC AcceptChannel ClosingSigned; do
        tn=$(echo $target | sed 's/\([a-z0-9]\)\([A-Z]\)/\1_\L\2/g')
        fn=msg_$(echo $tn | tr '[:upper:]' '[:lower:]')_target.rs
        cat msg_target_template.txt | sed s/MSG_TARGET/$target/ > $fn
index a60d11855d6c43df2de5dd320a1084ca0871e8d9..86b57fa0b04bae19ffb169ccf512df3fe772efef 100755 (executable)
@@ -1,5 +1,12 @@
 #!/bin/bash
 set -e
+
+pushd fuzz_targets/msg_targets
+rm *_target.rs
+./gen_target.sh
+[ "$(git diff)" != "" ] && exit 1
+popd
+
 cargo install --force honggfuzz
 for TARGET in fuzz_targets/*.rs fuzz_targets/msg_targets/*_target.rs; do
        FILENAME=$(basename $TARGET)