From 27b44b3bcdbcee60fb725be78556f42401bb8135 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=82=A8=EA=B6=81=EC=84=9D/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84?= =?utf8?q?=EC=9E=90?= Date: Tue, 17 Jul 2018 13:54:03 +0900 Subject: [PATCH] Updates for python script of test_driver (#1971) Add missing options(frameworktest_list_file, benchmark_op) Fix test script paths Signed-off-by: Seok NamKoong --- tools/test_driver/py/test_driver.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/tools/test_driver/py/test_driver.py b/tools/test_driver/py/test_driver.py index e10435b..da16bc3 100755 --- a/tools/test_driver/py/test_driver.py +++ b/tools/test_driver/py/test_driver.py @@ -68,6 +68,12 @@ def get_parsed_options(): dest="benchmarkacl_on", default=False, help="(default=off) run benchmark-acl") + parser.add_option( + "--benchmark_op", + action="store_true", + dest="benchmarkop_on", + default=False, + help="(default=off) run benchmark per operation") # profile parser.add_option( @@ -125,6 +131,14 @@ def get_parsed_options(): dest="ldlibrarypath", help= "(default=ARTIFACT_PATH/Product/out/lib) path that you want to include libraries") + parser.add_option( + "--frameworktest_list_file", + action="store", + type="string", + dest="frameworktest_list_file", + help= + "(default=ARTIFACT_PATH/tools/test_driver/pureacl_frameworktest_list.txt) filepath of model list for test" + ) # env parser.add_option( @@ -150,11 +164,10 @@ def get_parsed_options(): def run_unittest(options): - # FIXME: the place where run_unittest.sh is - cmd = "{mypath}/../run_unittest.sh \ + cmd = "{artifactpath}/tools/test_driver/run_unittest.sh \ --reportdir={artifactpath}/report \ --unittestdir={unittestdir}".format( - mypath=mypath, artifactpath=options.artifactpath, unittestdir=options.unittestdir) + artifactpath=options.artifactpath, unittestdir=options.unittestdir) ret = os.system(cmd) # TODO: handle return value @@ -166,15 +179,13 @@ def run_frameworktest(options): print("Cannot find {driverbin}".format(driverbin=options.framework_driverbin)) os._exit(1) - # FIXME: the place where run_frameworktest.sh is - cmd = "{mypath}/../run_frameworktest.sh \ + cmd = "{artifactpath}/tools/test_driver/run_frameworktest.sh \ --runtestsh={runtestsh} \ --driverbin={driverbin} \ --reportdir={artifactpath}/report \ --tapname=framework_test.tap \ --logname=framework_test.log \ --testname='Frameworktest'".format( - mypath=mypath, runtestsh=options.runtestsh, driverbin=options.framework_driverbin, artifactpath=options.artifactpath) @@ -190,15 +201,13 @@ def run_verification(options): driverbin=options.verification_driverbin)) os._exit(1) - # FIXME: the place where run_frameworktest.sh is - cmd = "{mypath}/../run_frameworktest.sh \ + cmd = "{artifactpath}/tools/test_driver/run_frameworktest.sh \ --runtestsh={runtestsh} \ --driverbin={driverbin} \ --reportdir={artifactpath}/report \ --tapname=verification_test.tap \ --logname=verification_test.log \ --testname='Verification'".format( - mypath=mypath, runtestsh=options.runtestsh, driverbin=options.verification_driverbin, artifactpath=options.artifactpath) @@ -213,12 +222,10 @@ def run_benchmark(options): print("Cannot find {driverbin}".format(driverbin=options.benchmark_driverbin)) os._exit(1) - # FIXME: the place where run_benchmark.sh is - cmd = "{mypath}/../run_benchmark.sh \ + cmd = "{artifactpath}/tools/test_driver/run_benchmark.sh \ --runtestsh={runtestsh} \ --driverbin={driverbin} \ --reportdir={artifactpath}/report/benchmark".format( - mypath=mypath, runtestsh=options.runtestsh, driverbin=options.benchmark_driverbin, artifactpath=options.artifactpath) @@ -227,8 +234,7 @@ def run_benchmark(options): def run_benchmarkacl(options): - # FIXME: the place where run_benchmark_acl.sh is - cmd = "{mypath}/../run_benchmark_acl.sh \ + cmd = "{artifactpath}/tools/test_driver/run_benchmark_acl.sh \ --reportdir={artifactpath}/report/benchmark \ --bindir={artifactpath}/Product/out/bin".format( artifactpath=options.artifactpath) -- 2.7.4