mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-04-19 03:59:45 +00:00
Minor changes
This commit is contained in:
parent
5ca0291749
commit
99531ce638
2 changed files with 14 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import sys, argparse, os
|
import sys, argparse, os
|
||||||
from .platform import YAMLPlatformFile
|
from .platform import YAMLPlatformFile
|
||||||
|
from .debug_analyze import *
|
||||||
from esds import __version__
|
from esds import __version__
|
||||||
|
|
||||||
def run(platform):
|
def run(platform):
|
||||||
|
@ -8,6 +9,9 @@ def run(platform):
|
||||||
sys.path.insert(0, simulation.location)
|
sys.path.insert(0, simulation.location)
|
||||||
simulation.run()
|
simulation.run()
|
||||||
|
|
||||||
|
def debug(args):
|
||||||
|
debug_infos(args.file)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
##### Main parser
|
##### Main parser
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
|
@ -20,11 +24,17 @@ def main():
|
||||||
run_parser=subparsers.add_parser("run", description='Run a simulation')
|
run_parser=subparsers.add_parser("run", description='Run a simulation')
|
||||||
run_parser=run_parser.add_argument("platform", help="Platform file")
|
run_parser=run_parser.add_argument("platform", help="Platform file")
|
||||||
|
|
||||||
|
##### Debug subparser
|
||||||
|
debug_parser=subparsers.add_parser("debug", description='Analyze debug files')
|
||||||
|
debug_parser=debug_parser.add_argument("file", help="Debug file to analyze")
|
||||||
|
|
||||||
##### Execute commands
|
##### Execute commands
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.command:
|
if args.command:
|
||||||
if args.command == "run":
|
if args.command == "run":
|
||||||
run(args.platform)
|
run(args.platform)
|
||||||
|
elif args.command == "debug":
|
||||||
|
debug(args)
|
||||||
elif args.version:
|
elif args.version:
|
||||||
print("ESDS v"+__version__)
|
print("ESDS v"+__version__)
|
||||||
else:
|
else:
|
||||||
|
|
4
esds/debug_analyze.py
Normal file
4
esds/debug_analyze.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
def debug_infos(file):
|
||||||
|
print("infos")
|
Loading…
Add table
Add a link
Reference in a new issue