From: Shobhit Verma Date: Mon, 6 Jun 2022 11:07:28 +0000 (+0530) Subject: [NativeTCT][Scripts][NonACR][Removed whitespaces] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f679897671a65a3b2c398d852644b9ab22e93aa1;p=test%2Ftct%2Fnative%2Fapi.git [NativeTCT][Scripts][NonACR][Removed whitespaces] Change-Id: I6274162e7d9cb370b4f2716ae4007fba94698b4a Signed-off-by: Shobhit Verma --- diff --git a/scripts_tpk/headgen.py b/scripts_tpk/headgen.py index 206984bed..e5bfce7be 100755 --- a/scripts_tpk/headgen.py +++ b/scripts_tpk/headgen.py @@ -61,7 +61,7 @@ def generate(profile,module): for suite in suites: #load all the modules of this suite in tcs - tcs = os.listdir("src/"+suite) + tcs = os.listdir("src/"+suite) for tc in tcs: #check to handle only one module, input given from command line if module_check == 1: @@ -101,7 +101,7 @@ def generate(profile,module): if (cmake_check_1 not in line and (cmake_check_2 in line or cmake_check_3 in line or cmake_check_4 in line)): escape_line = 1 if "ENDIF()" in line: - escape_line = 0 + escape_line = 0 if '.' in line and "}" not in line and escape_line == 0: #print line #check for .c and .cpp file @@ -166,7 +166,7 @@ def generate(profile,module): flag_inside_function = 0 else: flag_inside_function = 1 - + #print str(brace) + str(flag_inside_function) #check whether somes tcs are not for a particular profile #if "utc_image_util_decode_jpeg_n2" in tc_line: @@ -187,7 +187,7 @@ def generate(profile,module): continu = 0 #print "continu" + str(continu) pat = r'([\w]+)\s+([\S]+)\(([\w+\s+\w+])+\)' - + if re.search(pat,tc_line) and "actorSource.GetProperty" not in tc_line and tc_line is not "" and (("int " in tc_line and "(void)" in tc_line) or ("void " in tc_line and "(void)" in tc_line and ("startup" in tc_line or "cleanup" in tc_line))): if continu == 1: continue; @@ -221,13 +221,13 @@ def generate(profile,module): testcase_cleanup[function_name] = cleanup if startup_counter < cleanup_counter: startup_list.append("NULL") - startup_counter+=1 + startup_counter+=1 elif startup_counter > cleanup_counter: cleanup_list.append("NULL") cleanup_counter+=1 - - - + + + #print startup_counter #print cleanup_counter #header_file = suite+'/' + tc +"/tct-" + tc + "-_" + profile + ".h" @@ -251,7 +251,7 @@ def generate(profile,module): f.write('extern int '+testcase_list[i]+'(void);\n') f.write('\n') f.write('testcase tc_array[] = {\n') - + for i in range(testcase_counter): f.write(' {"'+testcase_list[i]+'"' + ','+testcase_list[i]+','+testcase_startup[testcase_list[i]] + ',' + testcase_cleanup[testcase_list[i]] + '},\n') f.write(' {NULL, NULL}\n') @@ -269,7 +269,7 @@ os.chdir("..") if ( len(sys.argv) == 1): profiles = ['mobile','wearable'] suites = ['itc','ctc','utc'] - + elif ( len(sys.argv) == 2): if sys.argv[1] == "itc" or sys.argv[1] == "ctc" or sys.argv[1] == "utc": suites = [sys.argv[1]] diff --git a/scripts_tpk/retriever.py b/scripts_tpk/retriever.py index d78f83815..95cb81228 100755 --- a/scripts_tpk/retriever.py +++ b/scripts_tpk/retriever.py @@ -134,7 +134,7 @@ def tc_fullinfo(TC_FILES): #for tc in TC_LIST: #print(tc) - + f=open(TFILEPRE, 'w') for tc in TC_LIST: f.write(tc+'\n') diff --git a/scripts_tpk/tcheadgen.py b/scripts_tpk/tcheadgen.py index 2bb18827c..43bae6d6f 100755 --- a/scripts_tpk/tcheadgen.py +++ b/scripts_tpk/tcheadgen.py @@ -25,7 +25,7 @@ def gen(): tf=open(TFILE) f=open(FILE, 'w') - + f.write('//\n// Copyright (c) 2022 Samsung Electronics Co., Ltd.\n//\n// Licensed under the Apache License, Version 2.0 (the License);\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an "AS IS" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n//\n') f.write('#ifndef __'+HEADER_NAME+'__\n') f.write('#define __'+HEADER_NAME+'__\n') @@ -38,11 +38,11 @@ def gen(): fields=line.strip('\n').split(',') testcase_list.append(fields[0]) testcase_counter+=1 - + if ( (startup_counter == 0) or (startup_list[startup_counter-1] != fields[1]) ): startup_list.append(fields[1]) startup_counter+=1 - + if ( (cleanup_counter == 0) or (cleanup_list[cleanup_counter-1] != fields[2]) ): cleanup_list.append(fields[2]) cleanup_counter+=1