From fd9d126124c601ad8255863edd1b1300d39982d9 Mon Sep 17 00:00:00 2001 From: Dongjia Zhang Date: Mon, 27 Jun 2022 23:19:15 +0900 Subject: [PATCH] Fix CI (#681) * Update test_all_fuzzers.sh * -- * fix ui.rs * fix Co-authored-by: Dominik Maier --- libafl/src/monitors/tui/ui.rs | 81 ++++++++++++++++------------------- scripts/test_all_fuzzers.sh | 4 +- 2 files changed, 38 insertions(+), 47 deletions(-) diff --git a/libafl/src/monitors/tui/ui.rs b/libafl/src/monitors/tui/ui.rs index 6bc0daf580..36e4bf47a4 100644 --- a/libafl/src/monitors/tui/ui.rs +++ b/libafl/src/monitors/tui/ui.rs @@ -132,14 +132,12 @@ impl TuiUI { let tabs = Tabs::new(titles) .block( Block::default() - .title( - Span::styled( - "charts (`g` switch)", - Style::default() - .fg(Color::LightCyan) - .add_modifier(Modifier::BOLD), - ), - ) + .title(Span::styled( + "charts (`g` switch)", + Style::default() + .fg(Color::LightCyan) + .add_modifier(Modifier::BOLD), + )) .borders(Borders::ALL), ) .highlight_style(Style::default().fg(Color::LightYellow)) @@ -277,14 +275,12 @@ impl TuiUI { let chart = Chart::new(datasets) .block( Block::default() - .title( - Span::styled( - title, - Style::default() - .fg(Color::LightCyan) - .add_modifier(Modifier::BOLD), - ), - ) + .title(Span::styled( + title, + Style::default() + .fg(Color::LightCyan) + .add_modifier(Modifier::BOLD), + )) .borders(Borders::ALL), ) .x_axis( @@ -361,14 +357,12 @@ impl TuiUI { let table = Table::new(items) .block( Block::default() - .title( - Span::styled( - "generic", - Style::default() - .fg(Color::LightCyan) - .add_modifier(Modifier::BOLD), - ), - ) + .title(Span::styled( + "generic", + Style::default() + .fg(Color::LightCyan) + .add_modifier(Modifier::BOLD), + )) .borders(Borders::ALL), ) .widths(&[Constraint::Ratio(1, 2), Constraint::Ratio(1, 2)]); @@ -474,19 +468,18 @@ impl TuiUI { }; } - let table = - Table::new(items) - .block( - Block::default() - .title(Span::styled( - "introspection", - Style::default() - .fg(Color::LightCyan) - .add_modifier(Modifier::BOLD), - )) - .borders(Borders::ALL), - ) - .widths(&[Constraint::Ratio(1, 2), Constraint::Ratio(1, 2)]); + let table = Table::new(items) + .block( + Block::default() + .title(Span::styled( + "introspection", + Style::default() + .fg(Color::LightCyan) + .add_modifier(Modifier::BOLD), + )) + .borders(Borders::ALL), + ) + .widths(&[Constraint::Ratio(1, 2), Constraint::Ratio(1, 2)]); f.render_widget(table, client_chunks[1]); } } @@ -503,14 +496,12 @@ impl TuiUI { .map(|msg| ListItem::new(Span::raw(msg))) .collect(); let logs = List::new(logs).block( - Block::default().borders(Borders::ALL).title( - Span::styled( - "clients logs (`t` to show/hide)", - Style::default() - .fg(Color::LightCyan) - .add_modifier(Modifier::BOLD), - ), - ), + Block::default().borders(Borders::ALL).title(Span::styled( + "clients logs (`t` to show/hide)", + Style::default() + .fg(Color::LightCyan) + .add_modifier(Modifier::BOLD), + )), ); f.render_widget(logs, area); } diff --git a/scripts/test_all_fuzzers.sh b/scripts/test_all_fuzzers.sh index c077e541ca..2290356de9 100755 --- a/scripts/test_all_fuzzers.sh +++ b/scripts/test_all_fuzzers.sh @@ -5,7 +5,7 @@ cd "$SCRIPT_DIR/.." || exit 1 # TODO: This should be rewritten in rust, a Makefile, or some platform-independent language -fuzzers=$(find ./fuzzers -maxdepth 1 -type d) +fuzzers=$(find ./fuzzers/* -maxdepth 0 -type d) backtrace_fuzzers=$(find ./fuzzers/backtrace_baby_fuzzers -maxdepth 1 -type d) libafl=$(pwd) @@ -34,7 +34,7 @@ do if [ "$1" != "--no-fmt" ]; then echo "[*] Checking fmt for $fuzzer" - cargo fmt --all -- --check || exit 1 + cargo fmt --check || exit 1 echo "[*] Running clippy for $fuzzer" cargo clippy || exit 1 else