summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch
blob: 4d5836570e2f4b048cc366c56e9624c08894b8a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From deccc0c69c2c8759c52885be8bdda54d3cee481c Mon Sep 17 00:00:00 2001
From: Yogesh Tyagi <yogesh.tyagi@intel.com>
Date: Sun, 11 Dec 2022 22:34:15 +0800
Subject: [PATCH] Add print function to print test run status in ptest format

Upstream-Status: Inappropriate [OE ptest specific]

Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
---
 run_tests.py | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/run_tests.py b/run_tests.py
index 1cd796dd..e3ffd1ab 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -327,6 +327,9 @@ def run_test(testname, host, target):
     else:
         ispc_exe_rel = add_prefix(host.ispc_cmd, host, target)
 
+    # to reslove the error '.rodata' can not be used when making a PIE object
+    ispc_exe_rel = ispc_exe_rel + " --pic"
+
     # is this a test to make sure an error is issued?
     want_error = (filename.find("tests_errors") != -1)
     if want_error == True:
@@ -795,6 +798,17 @@ def check_compiler_exists(compiler_exe):
             return
     error("missing the required compiler: %s \n" % compiler_exe, 1)
 
+def print_test_run_status(results):
+    for fstatus in results:
+       if (fstatus[1]  ==  Status.Success):
+          print( "%s: %s" % ("PASS", fstatus[0]))
+       elif (fstatus[1] ==  Status.Compfail):
+          print( "%s: %s" % ("FAIL", fstatus[0]))
+       elif (fstatus[1] ==  Status.Runfail):
+          print( "%s: %s" % ("FAIL", fstatus[0]))
+       elif (fstatus[1] ==  Status.Skip):
+          print( "%s: %s" % ("SKIP", fstatus[0]))
+
 def print_result(status, results, s, run_tests_log, csv):
     title = StatusStr[status]
     file_list = [fname for fname, fstatus in results if status == fstatus]
@@ -938,6 +952,8 @@ def run_tests(options1, args, print_version):
         pass_rate = -1
     print_debug("PASSRATE (%d/%d) = %d%% \n\n" % (len(run_succeed_files), total_tests_executed, pass_rate), s, run_tests_log)
 
+    print_test_run_status(results)
+
     for status in Status:
         print_result(status, results, s, run_tests_log, options.csv)
     fails = [status != Status.Compfail and status != Status.Runfail for _, status in results]