Skip to content

Commit b3d5166

Browse files
committed
[Tools] fix tv
1 parent a651f5d commit b3d5166

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ docker run -it optimuzz
1717
# Inside the docker
1818
echo $PWD # /home/user/optimuzz
1919
./build.sh
20+
eval $(opam env) # Optimuzz toolchains are installed under the current opam switch
2021
```
2122

2223
### Environment Variables

tools/tv.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ def run_opt(d: Path, timeout: str = '2s', passes: str = 'instcombine', save_resu
4040
return None
4141

4242
def run_tv(before: Path, after: Path, timeout: str = '2m', no_undef: bool = False, no_poison: bool = False):
43-
tv_args = ['timeout', timeout, 'alive-tv', after.absolute().as_posix(), before.absolute().as_posix()]
43+
tv_args = ['timeout', timeout, 'alive-tv', before.absolute().as_posix(), after.absolute().as_posix()]
4444
if no_undef:
4545
tv_args.append('--disable-undef-input')
4646
if no_poison:
4747
tv_args.append('--disable-poison-input')
4848
tv_p = sp.run(tv_args, capture_output=True, text=True)
4949
if "1 incorrect" in tv_p.stdout:
50+
print(tv_p.stdout, file=sys.stderr)
5051
return "incorrect"
5152
return "pass"
5253

@@ -87,7 +88,7 @@ def process_file(target: Path, crash_dir: Path):
8788

8889

8990
def postmortem(covers_dir: Path, crash_dir: Path, jobs: int, cont: bool = False):
90-
files = [d.absolute() for d in covers_dir.iterdir() if d.suffix == '.ll']
91+
files = [d.absolute() for d in covers_dir.iterdir() if d.suffix == '.ll' and 'opt.ll' not in d.name]
9192
files = unique_sorted_files(files)
9293
print(f"Found {len(files)} files to process", file=sys.stderr)
9394

0 commit comments

Comments
 (0)