mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-31 08:21:03 +00:00
Run analyzer test
This commit is contained in:
26
src/analyzer/test.py
Normal file
26
src/analyzer/test.py
Normal 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)
|
||||
Reference in New Issue
Block a user