From: shobhit verma Date: Fri, 7 Feb 2025 05:13:25 +0000 (+0000) Subject: Revert "[TCT][scripts][Non-ACR] Added script to show purpose in report page" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03ad32c8efa2f3f20824267deefd0c85e317151b;p=test%2Ftct%2Fnative%2Fapi.git Revert "[TCT][scripts][Non-ACR] Added script to show purpose in report page" This reverts commit 554864947314a051a622a3ad6725f31f697292bf. Reason for revert: Issue found in full execution, will fix and raise again. Change-Id: Ia3b43e4ca7ad2cf1f9d1d6d48532f1d36ae3bc8a --- diff --git a/scripts_tpk/tctestsgen.py b/scripts_tpk/tctestsgen.py index fad2273d4..fe7bde086 100755 --- a/scripts_tpk/tctestsgen.py +++ b/scripts_tpk/tctestsgen.py @@ -35,6 +35,7 @@ def gen(tcfile): set='' tfile=open(TFILE) fil=open(FILE, 'w') + # begin fil.write('\n') fil.write(' \n') @@ -55,50 +56,9 @@ def gen(tcfile): for element in feature: fil.write(' \n') fil.write(' \n') - tcname=fields[0] tcname=tcname.strip() - tcpurpose='' - - script_dir = os.path.dirname(os.path.abspath(__file__)) - api_dir = os.path.dirname(script_dir) - path_to_tc = os.path.join(api_dir, f'src/{BUILD_TYPE}/{MODULE_NAME}') - - if os.path.isdir(path_to_tc): - c_files = [f for f in os.listdir(path_to_tc) if f.endswith('.c')] - if c_files: - grep_command = ['grep', '-B', '10', tcname] + [os.path.join(path_to_tc, f) for f in c_files] - else: - return - else: - return - - try: - result = subprocess.run(grep_command, capture_output=True, text=True, check=True) - except subprocess.CalledProcessError as e: - print("Command failed with error: " + e.stderr + "\n") - - except Exception as e: - print("An unexpected error occurred: " + str(e) + "\n") - - output = result.stdout.strip() - lines = output.split('\n') - reversed_output = '\n'.join(reversed(lines)) - - purpose_pattern = re.compile(r'//& purpose:\s*(.*)') - description_pattern = re.compile(r'\* @description\s*(.*)') - - purpose_match = purpose_pattern.search(reversed_output) - if purpose_match: - tcpurpose = purpose_match.group(1).strip() - else: - description_match = description_pattern.search(reversed_output) - if description_match: - tcpurpose = description_match.group(1).strip() - else: - tcpurpose = "" - fil.write(' \n') fil.write(' \n') fil.write(' '+'{DEVICE_SUITE_TARGET_30}/external_wrapper.sh '+MODULE_FULL_NAME+' '+tcname+' '+BUILD_TYPE+'\n')