Skip to content

Commit c1006c4

Browse files
authored
Fix CI (#1553)
* export PROFILE * install aflplusplusw * no dot * a
1 parent c1eef33 commit c1006c4

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed

fuzzers/nyx_libxml2_parallel/setup_libxml2.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# cargo build --release
33
# PWD=$(pwd)
44
# export CC="$PWD/target/release/libafl_cc"
55
# export CXX="$PWD/target/release/libafl_cxx"
66

7-
export CC=afl-clang-fast
8-
export CXX=afl-clang-fast++
7+
# Check if afl-clang-fast exists in PATH
8+
if ! command -v afl-clang-fast &> /dev/null
9+
then
10+
echo "afl-clang-fast not found. Cloning and compiling AFLplusplus..."
11+
git clone https://github.com/AFLplusplus/AFLplusplus.git
12+
pushd AFLplusplus
13+
make
14+
popd
15+
else
16+
echo "afl-clang-fast already exists in PATH."
17+
fi
18+
19+
export CC="$(pwd)/AFLplusplus/afl-clang-fast"
20+
export CXX="$(pwd)/AFLplusplus/afl-clang-fast++"
21+
922
curl -C - https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.9.14/libxml2-v2.9.14.tar.gz --output libxml2-v2.9.14.tar.gz
1023
tar -xf ./libxml2-v2.9.14.tar.gz --transform s/libxml2-v2.9.14/libxml2/ || exit
1124
cd ./libxml2/ || exit

fuzzers/nyx_libxml2_standalone/setup_libxml2.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# cargo build --release
33
# PWD=$(pwd)
44
# export CC="$PWD/target/release/libafl_cc"
55
# export CXX="$PWD/target/release/libafl_cxx"
66

7-
export CC=afl-clang-fast
8-
export CXX=afl-clang-fast++
7+
# Check if afl-clang-fast exists in PATH
8+
if ! command -v afl-clang-fast &> /dev/null
9+
then
10+
echo "afl-clang-fast not found. Cloning and compiling AFLplusplus..."
11+
git clone https://github.com/AFLplusplus/AFLplusplus.git
12+
pushd AFLplusplus
13+
make
14+
popd
15+
else
16+
echo "afl-clang-fast already exists in PATH."
17+
fi
18+
19+
export CC="$(pwd)/AFLplusplus/afl-clang-fast"
20+
export CXX="$(pwd)/AFLplusplus/afl-clang-fast++"
921
curl -C - https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.9.14/libxml2-v2.9.14.tar.gz --output libxml2-v2.9.14.tar.gz
1022
tar -xf ./libxml2-v2.9.14.tar.gz --transform s/libxml2-v2.9.14/libxml2/ || exit
1123
cd ./libxml2/ || exit

scripts/test_all_fuzzers.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ cd "$SCRIPT_DIR/.." || exit 1
55
# TODO: This should be rewritten in rust, a Makefile, or some platform-independent language
66

77
if [[ -z "${RUN_ON_CI}" ]]; then
8-
fuzzers=$(find ./fuzzers -mindepth 1 -maxdepth 1 -type d)
9-
backtrace_fuzzers=$(find ./fuzzers/backtrace_baby_fuzzers -mindepth 1 -maxdepth 1 -type d)
10-
export PROFILE=dev
8+
fuzzers=$(find ./fuzzers -mindepth 1 -maxdepth 1 -type d)
9+
backtrace_fuzzers=$(find ./fuzzers/backtrace_baby_fuzzers -mindepth 1 -maxdepth 1 -type d)
1110
else
12-
cargo build -p build_and_test_fuzzers
13-
fuzzers=$(cargo run -p build_and_test_fuzzers -- "remotes/origin/main" "HEAD^")
14-
backtrace_fuzzers=""
11+
cargo build -p build_and_test_fuzzers
12+
fuzzers=$(cargo run -p build_and_test_fuzzers -- "remotes/origin/main" "HEAD^")
13+
backtrace_fuzzers=""
14+
export PROFILE=dev
1515
fi
1616

1717
libafl=$(pwd)

0 commit comments

Comments
 (0)