Updates for python script of test_driver (#1971)
author남궁석/동작제어Lab(SR)/Engineer/삼성전자 <sk.namkoong@samsung.com>
Tue, 17 Jul 2018 04:54:03 +0000 (13:54 +0900)
committer이춘석/동작제어Lab(SR)/Staff Engineer/삼성전자 <chunseok.lee@samsung.com>
Tue, 17 Jul 2018 04:54:03 +0000 (13:54 +0900)
Add missing options(frameworktest_list_file, benchmark_op)
Fix test script paths

Signed-off-by: Seok NamKoong <sk.namkoong@samsung.com>
tools/test_driver/py/test_driver.py

index e10435b..da16bc3 100755 (executable)
@@ -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)