Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Bobowski committed Jun 14, 2023
1 parent 5372af2 commit 9e6747c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions cakefuzzer/instrumentation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ class InstrumentationError(CakeFuzzerError):


async def apply(*args: Instrumentation) -> List[Instrumentation]:
_, unapplied = await check(*args)
await asyncio.gather(*[p.apply() for p in unapplied])
return unapplied
await asyncio.gather(*[p.apply() for p in args])
return args


async def revert(*args: Instrumentation) -> List[Instrumentation]:
applied, _ = await check(*args)
await asyncio.gather(*[p.revert() for p in applied])
return applied
await asyncio.gather(*[p.revert() for p in args])
return args


async def check(
Expand Down
4 changes: 2 additions & 2 deletions cakefuzzer/instrumentation/instrumentator.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ async def revert(self) -> None:

applied, unapplied = await check(*annotation_removal)
await revert(*applied, *unapplied)
print("Annotations Reverted", len(applied))
print("Annotations Reverted", len(applied) + len(unapplied))

applied, unapplied = await check(*frenames)
await revert(*applied, *unapplied)
print("FunctionCall Renames Reverted", len(applied))
print("FunctionCall Renames Reverted", len(applied) + len(unapplied))

applied, _ = await check(*patches)
await revert(*applied)
Expand Down

0 comments on commit 9e6747c

Please sign in to comment.