[TCT][scripts][Non-ACR] Rootstrap and exclude.list issue fixed 44/297444/1
authorTarun Kumar <tarun1.kumar@samsung.com>
Fri, 18 Aug 2023 08:30:32 +0000 (14:00 +0530)
committerTarun Kumar <tarun1.kumar@samsung.com>
Fri, 18 Aug 2023 08:30:32 +0000 (14:00 +0530)
Change-Id: If31246166730fd25fe2410b67aafdc136772d9ac
Signed-off-by: Tarun Kumar <tarun1.kumar@samsung.com>
scripts_tpk/retriever.py
scripts_tpk/tctestsgen.py
scripts_tpk/tpk_create.sh

index 95cb812..6406069 100755 (executable)
@@ -182,6 +182,8 @@ def tc_anum2(TC_FILES):
                        src.seek(0)
                        for line_in_list in src:
                                stripped_line=line_in_list.strip('\n')
+                               if len(stripped_line)==0:
+                                       continue
                                #for profile
                                if(stripped_line.startswith('##') and stripped_line.endswith('##')):
                                        end_hash_index = stripped_line.find('##',2)
@@ -194,7 +196,7 @@ def tc_anum2(TC_FILES):
                                        else:
                                                checking = False
                                #for build_type
-                               if(checking == True and stripped_line.startswith(TYPE)):
+                               if(checking == True and stripped_line.startswith(TYPE+":")):
                                        tc_name_index = stripped_line.find(':')
                                        tc_name = stripped_line[tc_name_index+1:]
                                        if (test1.find(tc_name)>=0):
index 13a46ce..39f1a5f 100755 (executable)
@@ -157,6 +157,8 @@ if os.path.exists('exclude.list'):
                src.seek(0)
                for line_in_list in src:
                        stripped_line=line_in_list.strip()
+                       if len(stripped_line)==0:
+                               continue
                        #for profile
                        if(stripped_line.startswith('##') and stripped_line.endswith('##')):
                                end_hash_index = stripped_line.find('##',2)
@@ -169,7 +171,7 @@ if os.path.exists('exclude.list'):
                                else:
                                        checking = False
                        #for build_type
-                       if(checking == True and stripped_line.startswith(BUILD_TYPE)):
+                       if(checking == True and stripped_line.startswith(BUILD_TYPE+':')):
                                tc_name_index = stripped_line.find(':')
                                tc_name = stripped_line[tc_name_index+1:]
                                if (test1.find(tc_name)>=0):
index ed870a8..00aa3ec 100755 (executable)
@@ -580,7 +580,7 @@ getlatestrootstrap() {
        ROOTSTRAP_STRING_ARRAY=($ROOTSTRAP_LIST)
        for ROOTSTRAP_NAME in "${ROOTSTRAP_STRING_ARRAY[@]}";
        do
-               DATE_STR="cut -d'.' -f5 <<<$ROOTSTRAP_NAME"  #extracting date string from rootstrap name and finding the latest date and rootstrap
+               DATE_STR=`cut -d'.' -f 5 <<<$ROOTSTRAP_NAME`  #extracting date string from rootstrap name and finding the latest date and rootstrap
                if [[ "$DATE_STR" > "$LATEST_DATE" ]] && [[ ! -z "$DATE_STR" ]];  then
                        LATEST_DATE=$DATE_STR
                        EXISTING_ROOTSTRAP=$ROOTSTRAP_NAME