test: Cleanup test files in test-{security,symbol}-check.py

This commit is contained in:
Hennadii Stepanov
2021-03-13 18:27:11 +02:00
parent e0bc27a14c
commit 61a0f8f9cc
2 changed files with 14 additions and 0 deletions

View File

@@ -5,12 +5,15 @@
'''
Test script for symbol-check.py
'''
import os
import subprocess
import unittest
def call_symbol_check(cc, source, executable, options):
subprocess.run([cc,source,'-o',executable] + options, check=True)
p = subprocess.run(['./contrib/devtools/symbol-check.py',executable], stdout=subprocess.PIPE, universal_newlines=True)
os.remove(source)
os.remove(executable)
return (p.returncode, p.stdout.rstrip())
def get_machine(cc):