Run analyzer test

This commit is contained in:
Maurice Heumann
2025-03-19 10:46:00 +01:00
parent 68759d7691
commit 101e524731
5 changed files with 46 additions and 5 deletions

26
src/analyzer/test.py Normal file
View File

@@ -0,0 +1,26 @@
import os
import subprocess
emulator_root = os.getenv('EMULATOR_ROOT')
analysis_sample = os.getenv('ANALYSIS_SAMPLE')
virtual_sample = 'C:/analysis-sample.exe'
application = 'analyzer'
def make_app(app):
if os.name == 'nt':
return app + ".exe"
return app
command = [
os.path.join(os.getcwd(), make_app(application)),
'-c',
'-e', emulator_root,
'-p', virtual_sample, analysis_sample,
virtual_sample
]
result = subprocess.run(command, cwd=os.getcwd())
exit(result.returncode)