Don't run pwn commands in test (#1358)

pull/1359/head
Gulshan Singh 3 years ago committed by GitHub
parent 525bfaf2c2
commit e6d118c08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,7 +7,7 @@ import os
import pwndbg.commands
import pwndbg.lib.which
pwncmds = ["asm", "constgrep", "disasm", "pwn", "unhex"]
pwncmd_names = ["asm", "constgrep", "disasm", "pwn", "unhex"]
shellcmd_names = [
"awk",
"bash",
@ -60,7 +60,7 @@ shellcmd_names = [
"zsh",
]
pwncmds = list(filter(pwndbg.lib.which.which, pwncmds))
pwncmds = list(filter(pwndbg.lib.which.which, pwncmd_names))
shellcmds = list(filter(pwndbg.lib.which.which, shellcmd_names))

@ -5,6 +5,7 @@ import pytest
import tests
from pwndbg.commands import command_names
from pwndbg.commands.shell import pwncmd_names
from pwndbg.commands.shell import shellcmd_names
BINARY = tests.binaries.get("heap_bins.out")
@ -21,6 +22,7 @@ disallowed_commands = set(
# Don't run any shell commands
disallowed_commands.update(shellcmd_names)
disallowed_commands.update(pwncmd_names)
filtered_commands = command_names - disallowed_commands
@ -33,6 +35,7 @@ allowed_exceptions = [
]
# Only run on CI, unless the user requests this with the RUN_FLAKY environment variable
running_on_ci = os.getenv("GITHUB_ACTIONS")
run_flaky = os.getenv("RUN_FLAKY")

Loading…
Cancel
Save