Use more generic name as it will be use in GitHub Action too
authorFranck Royer <franck@royer.one>
Tue, 21 Apr 2020 22:00:43 +0000 (08:00 +1000)
committerFranck Royer <franck@royer.one>
Wed, 22 Apr 2020 23:36:48 +0000 (09:36 +1000)
.travis.yml
fuzz/ci-fuzz.sh [new file with mode: 0755]
fuzz/travis-fuzz.sh [deleted file]

index cc42b06c7771cad278d8fe9a10a957a65304d6b7..0c36806c63c059869d44f3e56082340cbf03eca6 100644 (file)
@@ -26,7 +26,7 @@ script:
      - if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose; fi
      - if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose -p lightning; fi
      # Run lightning workspace fuzz tests on Rust stable
-     - if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
+     - if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd fuzz && cargo test --verbose && ./ci-fuzz.sh; fi
      # Generate code cov information on Rust 1.39.0
      - if [ "$(rustup show | grep default | grep 1.39.0)" != "" ]; then
            wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
diff --git a/fuzz/ci-fuzz.sh b/fuzz/ci-fuzz.sh
new file mode 100755 (executable)
index 0000000..57e3264
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/bash
+set -e
+
+pushd src/msg_targets
+rm msg_*.rs
+./gen_target.sh
+[ "$(git diff)" != "" ] && exit 1
+popd
+pushd src/bin
+rm *_target.rs
+./gen_target.sh
+[ "$(git diff)" != "" ] && exit 1
+popd
+
+cargo install --force honggfuzz
+sed -i 's/lto = true//' Cargo.toml
+HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo hfuzz build
+for TARGET in src/bin/*.rs; do
+       FILENAME=$(basename $TARGET)
+       FILE="${FILENAME%.*}"
+       HFUZZ_RUN_ARGS="--exit_upon_crash -v -n2"
+       if [ "$FILE" = "chanmon_consistency_target" ]; then
+               HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64 -N100000"
+       else
+               HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N1000000"
+       fi
+       export HFUZZ_RUN_ARGS
+       HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo hfuzz run $FILE
+       if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
+               cat hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
+               for CASE in hfuzz_workspace/$FILE/SIG*; do
+                       cat $CASE | xxd -p
+               done
+               exit 1
+       fi
+done
diff --git a/fuzz/travis-fuzz.sh b/fuzz/travis-fuzz.sh
deleted file mode 100755 (executable)
index 57e3264..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-set -e
-
-pushd src/msg_targets
-rm msg_*.rs
-./gen_target.sh
-[ "$(git diff)" != "" ] && exit 1
-popd
-pushd src/bin
-rm *_target.rs
-./gen_target.sh
-[ "$(git diff)" != "" ] && exit 1
-popd
-
-cargo install --force honggfuzz
-sed -i 's/lto = true//' Cargo.toml
-HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo hfuzz build
-for TARGET in src/bin/*.rs; do
-       FILENAME=$(basename $TARGET)
-       FILE="${FILENAME%.*}"
-       HFUZZ_RUN_ARGS="--exit_upon_crash -v -n2"
-       if [ "$FILE" = "chanmon_consistency_target" ]; then
-               HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -F 64 -N100000"
-       else
-               HFUZZ_RUN_ARGS="$HFUZZ_RUN_ARGS -N1000000"
-       fi
-       export HFUZZ_RUN_ARGS
-       HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" cargo hfuzz run $FILE
-       if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
-               cat hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
-               for CASE in hfuzz_workspace/$FILE/SIG*; do
-                       cat $CASE | xxd -p
-               done
-               exit 1
-       fi
-done