Remove declare -A (#976)

* fix

* fix

* debug

* debug

* older version

* newer version

* fix

* unix?

* fix
This commit is contained in:
Dongjia "toka" Zhang 2022-12-30 02:02:38 +09:00 committed by GitHub
parent 3e38862837
commit 9458549fef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 19 deletions

View File

@ -282,7 +282,7 @@ pub struct FuzzerOptions {
pub cores: Cores,
/// port on which the broker should listen
#[arg(short = 'p', long, default_value = "31337", value_name = "PORT")]
#[arg(short = 'p', long, default_value = "1337", value_name = "PORT")]
pub broker_port: u16,
/// ip:port where a remote broker is already listening

View File

@ -16,8 +16,7 @@ pub use prometheus::PrometheusMonitor;
#[cfg(feature = "std")]
pub mod disk;
use alloc::{fmt::Debug, string::String, vec::Vec};
use core::fmt::Write;
use core::{fmt, time::Duration};
use core::{fmt, fmt::Write, time::Duration};
#[cfg(feature = "std")]
pub use disk::{OnDiskJSONMonitor, OnDiskTOMLMonitor};

View File

@ -106,7 +106,7 @@ pub mod windows_asan;
#[cfg(all(windows, feature = "std"))]
pub use windows_asan::*;
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
#[cfg(unix)]
pub mod forkserver;
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
#[cfg(unix)]
pub use forkserver::*;

View File

@ -2,7 +2,6 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd "$SCRIPT_DIR/.." || exit 1
# TODO: This should be rewritten in rust, a Makefile, or some platform-independent language
if [[ -z "${RUN_ON_CI}" ]]; then
@ -37,9 +36,6 @@ do
export CARGO_PROFILE_"$profile"_INCREMENTAL=true
done
# record time of each fuzzer
declare -A time_record || (echo "declare -A not avaliable, please update your bash version to 4";exit 1)
# shellcheck disable=SC2116
for fuzzer in $(echo "$fuzzers" "$backtrace_fuzzers");
do
@ -49,7 +45,6 @@ do
fi
cd "$fuzzer" || exit 1
start=$(date +%s)
# Clippy checks
if [ "$1" != "--no-fmt" ]; then
@ -74,8 +69,6 @@ do
cargo build || exit 1
echo "[+] Done building $fuzzer"
fi
end=$(date +%s)
time_record[$fuzzer]=$((end-start))
du -sh "$CARGO_TARGET_DIR"
# Save disk space
cargo clean -p "$(basename "$fuzzer")"
@ -90,8 +83,3 @@ do
cd "$libafl" || exit 1
echo ""
done
# print time for each fuzzer
for key in "${!time_record[@]}"; do
echo "dir: $key, time: ${time_record[$key]}";
done

View File

@ -10,5 +10,5 @@ keywords = ["ci"]
categories = ["development-tools::testing"]
[dependencies]
cargo_toml = "0.13"
cargo_toml = "0.14"
walkdir = "2"