# Where the result file can be found
parser.add_argument('-r', nargs='?',type = str, default=None, help="Result file path")
parser.add_argument('-c', action='store_true', help="CSV output")
parser.add_argument('-e', action='store_true', help="Embedded test")
# -o needed when -e is true to know where to extract the output files
parser.add_argument('-o', nargs='?',type = str, default="Output", help="Output dir path")

parser.add_argument('-b', nargs='?',type = str, default="FullBenchmark", help="Full Benchmark dir path")
parser.add_argument('-m', action='store_true', help="Mathematica output")
parser.add_argument('-t', nargs='?',type = str, default=None, help="External trace file")

args = parser.parse_args()


if args.f is not None:
    p = parse.Parser()
    # Parse the test description file
    root = p.parse(args.f)
    if args.t:
       with open(args.t,"r") as trace:
         with open(args.r,"r") as results:
             analyze(root,results,args,iter(trace))
    else:
       with open(args.r,"r") as results:
           analyze(root,results,args,None)
    if args.e:
       # In FPGA mode, extract output files from stdout (result file)
       with open(args.r,"r") as results:
          extractDataFiles(results,args.o)
    
else:
Пример #2
0
                    default="FullBenchmark",
                    help="Full Benchmark dir path")
parser.add_argument('-m', action='store_true', help="Mathematica output")
parser.add_argument('-t',
                    nargs='?',
                    type=str,
                    default=None,
                    help="External trace file")

args = parser.parse_args()

if args.f is not None:
    #p = parse.Parser()
    # Parse the test description file
    #root = p.parse(args.f)
    root = parse.loadRoot(args.f)
    if args.t:
        with open(args.t, "r") as trace:
            with open(args.r, "r") as results:
                analyze(root, results, args, iter(trace))
    else:
        with open(args.r, "r") as results:
            analyze(root, results, args, None)
    if args.e:
        # In FPGA mode, extract output files from stdout (result file)
        with open(args.r, "r") as results:
            extractDataFiles(results, args.o)

    sys.exit(resultStatus)

else: