mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
[contrib] convert test-security-check to python3
This commit is contained in:
parent
958bf40489
commit
2bff472992
@ -1,11 +1,10 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python3
|
||||||
# Copyright (c) 2015-2017 The Bitcoin Core developers
|
# Copyright (c) 2015-2017 The Bitcoin Core developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
'''
|
'''
|
||||||
Test script for security-check.py
|
Test script for security-check.py
|
||||||
'''
|
'''
|
||||||
from __future__ import division,print_function
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
@ -22,7 +21,7 @@ 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.check_call([cc,source,'-o',executable] + options)
|
||||||
p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
p = subprocess.Popen(['./security-check.py',executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
|
||||||
(stdout, stderr) = p.communicate()
|
(stdout, stderr) = p.communicate()
|
||||||
return (p.returncode, stdout.rstrip())
|
return (p.returncode, stdout.rstrip())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user