From 1acd0b1659dc11169ea5d6c604ccd886feaa9c06 Mon Sep 17 00:00:00 2001 From: AinL Date: Tue, 5 Apr 2022 00:12:44 +0900 Subject: [PATCH] Fuzz: Add progress bar during `creduce` processing (#3) * fuzz: add seed feature fuzz: add easy flag (ease csmith) * fuzz: remove inline prob flag * fuzz: fix clipboard error... * update fuzz * Add `--skip-build` option * fuzz: add progress bar on creduce fuzz: modify gitignore * fuzz: add rotate animation * update to tqdm * fuzz: fix format text * fuzz: gitignore add tail enter * Minor fix Co-authored-by: Minseong Jang --- tests/fuzz.py | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/tests/fuzz.py b/tests/fuzz.py index 5867215..d415f0a 100644 --- a/tests/fuzz.py +++ b/tests/fuzz.py @@ -14,6 +14,7 @@ import argparse import sys import re import random +import tqdm from pathlib import Path REPLACE_DICT = { @@ -53,6 +54,20 @@ REPLACE_DICT = { CSMITH_DIR = "csmith-2.3.0" SKIP_TEST = 102 +class ProgressBar: + def __init__(self): + self.stage = 0 + self.stage_indicators = ["-", "\\", "|", "/", ] + self.pbar = tqdm.tqdm(total=1, bar_format="{l_bar}{bar}| [Elapsed:{elapsed},