mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-10 10:52:31 -05:00
test: use subprocess.run() in test-security-check.py
This commit is contained in:
parent
968aaae940
commit
9fe71a57a6
1 changed files with 3 additions and 4 deletions
|
@ -20,10 +20,9 @@ def write_testcode(filename):
|
||||||
''')
|
''')
|
||||||
|
|
||||||
def call_security_check(cc, source, executable, options):
|
def call_security_check(cc, source, executable, options):
|
||||||
subprocess.check_call([cc,source,'-o',executable] + options)
|
subprocess.run([cc,source,'-o',executable] + options, check=True)
|
||||||
p = subprocess.Popen(['./contrib/devtools/security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
|
p = subprocess.run(['./contrib/devtools/security-check.py',executable], stdout=subprocess.PIPE, universal_newlines=True)
|
||||||
(stdout, stderr) = p.communicate()
|
return (p.returncode, p.stdout.rstrip())
|
||||||
return (p.returncode, stdout.rstrip())
|
|
||||||
|
|
||||||
class TestSecurityChecks(unittest.TestCase):
|
class TestSecurityChecks(unittest.TestCase):
|
||||||
def test_ELF(self):
|
def test_ELF(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue