[TCT][Tool][Non-ACR] Minor bug fixes in tool 11/311511/2
authorUtkarsh Tiwari <utk.tiwari@samsung.com>
Wed, 22 May 2024 05:21:05 +0000 (10:51 +0530)
committerUtkarsh Tiwari <utk.tiwari@samsung.com>
Wed, 22 May 2024 05:27:23 +0000 (10:57 +0530)
Change-Id: Iea3bea92a787ec2e96715babe1d224a775332cf7
Signed-off-by: Utkarsh Tiwari <utk.tiwari@samsung.com>
tool/TC_Assistant_Tool/HELP_TEXT.txt
tool/TC_Assistant_Tool/data_TCT.json
tool/TC_Assistant_Tool/latest_rootstrap.py
tool/TC_Assistant_Tool/log_debugger.py
tool/TC_Assistant_Tool/modelweight.pth
tool/TC_Assistant_Tool/tct_assistance.py
tool/TC_Assistant_Tool/tool_dataset.csv

index 7f35584059b863c781c14cd6dd2fc658987a6eea..479510e37925ae2e698c52aae951974d08317aa0 100644 (file)
@@ -38,8 +38,8 @@ Hello, this is a guide for TC Assistant tool.
 
     **For example:**
 
-    If user has entered webrtc module then tool will search for its header file media/webrtc.h in tizeniot-8.0-device.core.private.20230823_131527 rootstrap.
-    > Header file should be present at path /home/sri/tizen-studio/platforms/tizen-8.0/tizeniot/rootstraps/tizeniot-8.0-device.core.private.20230823_131527/usr/include, otherwise tool will run into error.
+    If user has entered webrtc module then tool will search for its header file media/webrtc.h in tizeniot-9.0-device.core.private.20230823_131527 rootstrap.
+    > Header file should be present at path /home/sri/tizen-studio/platforms/tizen-9.0/tizeniot/rootstraps/tizeniot-9.0-device.core.private.20230823_131527/usr/include, otherwise tool will run into error.
 
 6. API's for which you need to create TCs, those api's declaration need to be present in the header files mentioned in Module_Header_Mapping.csv file
 
index 211ddcddbe679ac5613d205d99c7d86d3e23be3c..de830b0970f390dc65d91478bd325feee57bf542 100644 (file)
       "tag": "greetings",\r
       "patterns": ["Hi", "Hello", "Hey"],\r
       "responses": [\r
-        "Hello, Is this request for new module or for existing module?"\r
+        "Hey, Welcome to TC Assistance System. Tell me how would you like to proceed? \n > You can add a new UTC in existing module\n > You can add UTC in new module\n > Support Assistant\n > Remove Deprecated APIs\n"\r
       ]\r
     },\r
     {\r
       "tag": "supportsys",\r
       "patterns": ["Support", "I want support for issue"],\r
       "responses": [\r
-        "Please select among below options :\n\na. Build issue\nb. Install issue\nc. Environment setup\nd. Rootstrap installation\ne. Some other issue\n\n[ To navigate, please type 'Back' ]"\r
+        "Please select among below options :\n\na. Build issue\nb. Install issue\nc. Environment setup\nd. Rootstrap installation\n\n[ To navigate, please type 'Back' ]"\r
       ]\r
     },\r
     {\r
       "tag": "rootstrapsupport",\r
       "patterns": ["I need help for installing rootstrap", "I want support for rootstrap installation issue"],\r
       "responses": [\r
-        "Rootstrap installation guide/steps:\n\na. Download sdk-build repo code:\ngit clone ssh://[user-id]@review.tizen.org:29418/sdk/tools/sdk-build -b tizen ~/sdk-build\ngit checkout tizen\nexport PATH=~/sdk-build:$PATH'\n\nb. Install 'add-ons' (Only in case on tizeniot. Do not refer this point (b) for mobile, wearable )\nadd-ons download path: http://10.113.245.23/download/tct/template/tizeniot/\ncommand: ~/sdk-build/pkg-cli install-file -P <add_on_name> -l ~/tizen-studio --force\n\nc. Install tizeniot rootstrap:\npath: https://bart.sec.samsung.net/artifactory/download-tizen-generic/snapshots/TIZEN/Tizen/Tizen-Unified/\ncommand: ~/sdk-build/pkg-cli install-file -P <rootstrap_zip_name> -l ~/tizen-studio --force\n\n[ To navigate, please type 'Back' ]"\r
+        "Rootstrap installation guide/steps:\n\na. Download sdk-build repo code:\ngit clone ssh://[user-id]@review.tizen.org:29418/sdk/tools/sdk-build -b tizen ~/sdk-build\ngit checkout tizen\nexport PATH=~/sdk-build:$PATH\n\nb. Download and Install rootstrap:\nrootstrap: https://bart.sec.samsung.net/ui/native/download-tizen-generic/snapshots/TIZEN/Tizen/Tizen-Unified-X/tizen-unified-x_20240519.214519/builddata/private-sdk-rootstrap/    Intatll command: ~/sdk-build/pkg-cli install-file -P <rootstrap_zip_name> -l ~/tizen-studio \96force\n\n[ To navigate, please type 'Back' ]"\r
       ]\r
     },\r
     {\r
index c383ab4bb44ee1cf73ba040bb667720e8234f29e..c798a1ec2108f55817acbebed1a2a5567dc2c537 100644 (file)
@@ -11,7 +11,7 @@ def latest_rootstrap():
 \r
     rootstrap_dates = []\r
     for folder_name in rootstrap_folder_names:\r
-        if len(folder_name) < 25:\r
+        if len(folder_name) <= 25:\r
                 continue\r
         else:\r
             folder_name = folder_name.split('.',4)[4]\r
@@ -29,4 +29,3 @@ def latest_rootstrap():
             res = ele\r
     find_latest = ROOTSTRAP_DIR + "//" + res\r
     return find_latest\r
-\r
index 843e224b376860d42a9120ea5fc0c8b4a65c1530..29118fa992a8c37f76c537b09ae2449f830e3ec1 100644 (file)
@@ -22,22 +22,18 @@ KEYSTRORE_PASSWORD_ERROR = """KEYSTORE PASSWORD ERROR
 
 Kindly follow below mentioned steps to solve this error -:
 
+Solution 1)
 run below command first before tpkbuild command:
-   "sudo env | grep -i DBUS_SESSION_BUS_ADDRESS | sed 's/^[A-Z_]*=\(.*\)/\1/' > ~/tizen-studio/tools/certificate-encryptor/.secret"
-
-If accessing linux machine using putty then follow below steps:
-
-1) Extract the address of the dbus-session-bus from the arguments of dbus-daemon:
-   ps -ef | grep "dbus-daemon --fork --session --address"
-
-2) Set DBUS_SESSION_BUS_ADDRESS=<address>
-[ Above step 1 and 2 are given at: https://developer.tizen.org/ko/community/tip-tech/how-manage-certificates-and-package-applications-different-ubuntu-setups?langredirect=1 ]
-
-3) From above link, follow step 1 and 2 under "Manage certificates through remote login"
-
-4) Create a file named ".secret" and place it in ~/tizen-studio/tools/certificate-encryptor
-
-5) Copy the value of DBUS_SESSION_BUS_ADDRESS in the .secret file and save."""
+1) ps -ex | grep dbus-daemon
+2) In step 1, DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus  => Such value need to consider
+3) Create a file named ".secret" and place it in ~/tizen-studio/tools/certificate-encryptor
+4) Copy the value of DBUS_SESSION_BUS_ADDRESS (unix:path=/run/user/1000/bus) in the .secret file and save.
+5) If 'echo $DBUS_SESSION_BUS_ADDRESS' => coming empty, then run command:
+   export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"
+
+Solution 2)
+Run pwdwrong.sh script inside known_issues folder (/api/known_issues/pwdwrong.sh)
+Usage: sudo sh /api/known_issues/pwdwrong.sh"""
 
 def build_log_debug(BUILD_LOG_TEXT):
     if 'invalid type argument' in BUILD_LOG_TEXT:
index a457810ba8659f9c9c440b3a9daee6f6f78d2a54..74e80d52c86439d16291edf76f62cd54b5647be7 100644 (file)
Binary files a/tool/TC_Assistant_Tool/modelweight.pth and b/tool/TC_Assistant_Tool/modelweight.pth differ
index efd4c536e4b909df27433699936eb03dcb563caa..652eb4f709dffb917f2146cc4e4ae8091e839336 100644 (file)
@@ -235,8 +235,9 @@ feature_name = ""
 previous_intent = 'entry'\r
 execute_tc_params_text = 'ARCHITECTURE: armv7l PROFILE: mobile'\r
 RET_TYPE = "int"\r
-stage_list = ["TC Addition", "Module Name", "API Info", "Feature Info", "Pre Post Info", "Negative TC"]\r
+stage_list = ["Main Menu", "Module Name", "API Info", "Feature Info", "Pre Post Info", "Negative TC"]\r
 last_stage_index = 0\r
+in_remove_stage = 0\r
 new_module = False\r
 all_pre_post_api_skip = False\r
 flag_check_negative=False\r
@@ -270,6 +271,7 @@ def get_response(message):
         global NO_OF_NEGATIVE_TC\r
         global stage_list\r
         global last_stage_index\r
+        global in_remove_stage\r
         global api_names\r
         global pre_post_api_names\r
         global enum_dict\r
@@ -292,6 +294,7 @@ def get_response(message):
     # Load intents from json file\r
     log_info_save_processing(logger, "Importing data_TCT.json file")\r
 \r
+\r
     try:\r
         if radio_var.get() == 2:\r
             f = open("Ko_Lang_Support/data_TCT_KOR.json")\r
@@ -346,12 +349,16 @@ def get_response(message):
                     return "exit"\r
                 get_response(msg)\r
 \r
+        elif (previous_intent == "entry" or previous_intent == "goback") and (message == "back" or message == "Back" or message == "in the back"):\r
+            msg = "hey"\r
+            get_response(msg)\r
+\r
         elif previous_intent == "supportsys" and (message == "back" or message == "Back" or message == "in the back"):\r
             msg = "support"\r
             previous_intent = "goback"\r
             get_response(msg)\r
 \r
-        elif previous_intent == "modulename" and (message == "back" or message == "Back" or message == "in the back"):\r
+        elif previous_intent == "modulenameremove" and (message == "back" or message == "Back" or message == "in the back"):\r
             msg = "remove api"\r
             previous_intent = "goback"\r
             get_response(msg)\r
@@ -359,6 +366,7 @@ def get_response(message):
         elif previous_intent == "inputremovalapi" and (message == "back" or message == "Back" or message == "in the back"):\r
             msg = "Module Name: "+ module_name\r
             previous_intent = "removeapi"\r
+            in_remove_stage = 1\r
             get_response(msg)\r
 \r
         elif message == 'a' or message == 'b' or message == 'c' or message == 'd' or message == 'e' or message == '' or message == "exit" or message == "EXIT" or message == "Exit":\r
@@ -379,15 +387,21 @@ def get_response(message):
 \r
         elif message.lower() == 'yes' or message.lower() =='no':\r
             #in case when module name typed wrong and suggestion is provided\r
+            override = False\r
             if previous_intent == 'modulename':\r
                 if message.lower() == 'yes':\r
                     last_stage_index = 1\r
                     intent = 'modulename'\r
+                    override = True\r
                 elif message.lower() == "no":\r
                     intent = 'modulenotfound'\r
                 for i in data['intents']:\r
                     if i["tag"] == intent:\r
                         result = random.choice(i["responses"])\r
+                if in_remove_stage == 1 and override == True:\r
+                        result = "Module name found" + "\n" + "Please enter the list of deprecated APIs which you want to be removed in the format of DELETE: API_NAME_1, API_NAME_2, API_NAME_3, etc.\n\nOR\n\nIf full module is to be deleted then type: DELETE: full_module\n\n[ To navigate, please type 'Back' ]"\r
+                        previous_intent = 'modulenameremove'\r
+\r
 \r
             elif previous_intent == 'apiinfo':\r
                 if message.lower() == 'yes':\r
@@ -442,6 +456,8 @@ def get_response(message):
                     result = get_en_or_ko_replies('translate_13', radio_var.get())\r
                     previous_intent = 'after_launch'\r
 \r
+            elif previous_intent == 'removeapi':\r
+                previous_intent = 'modulenamesuggest'\r
 \r
             elif previous_intent == "inputremovalapi":\r
                 if message.lower() == "yes":\r
@@ -500,11 +516,13 @@ def get_response(message):
                     previous_intent = 'modulename'\r
             else:\r
                 module_name_suggested = module_autocorrect(module_name)\r
+                if previous_intent == "removeapi":\r
+                    in_remove_stage = 1\r
                 if module_name_suggested == True:\r
                     last_stage_index = 1\r
-                    if previous_intent == "removeapi":\r
+                    if previous_intent == "removeapi" or previous_intent == "modulenamesuggest" or in_remove_stage == 1:\r
                         result = "Module name found" + "\n" + "Please enter the list of deprecated APIs which you want to be removed in the format of DELETE: API_NAME_1, API_NAME_2, API_NAME_3, etc.\n\nOR\n\nIf full module is to be deleted then type: DELETE: full_module\n\n[ To navigate, please type 'Back' ]"\r
-                        previous_intent = 'modulename'\r
+                        previous_intent = 'modulenameremove'\r
                     else:\r
                         result = "Module name found" + "\n" + result\r
                         previous_intent = 'modulename'\r
@@ -552,8 +570,6 @@ def get_response(message):
             else:\r
                 result= get_en_or_ko_replies('translate_22', radio_var.get())\r
 \r
-\r
-\r
         elif intent == 'apiinfo':\r
             callback_duplicate_check.clear()\r
             clear_api_list()\r
@@ -658,7 +674,6 @@ def get_response(message):
             else:\r
                 result = get_en_or_ko_replies('translate_32', radio_var.get())\r
 \r
-\r
         elif intent == 'prepostinfo':\r
             enum_dict_pre_post = {}\r
 \r
@@ -900,6 +915,7 @@ def get_response(message):
             else:\r
                 result = get_en_or_ko_replies('translate_53', radio_var.get())\r
 \r
+\r
         if intent == "launchtctmgr":\r
             bar("Installing...")\r
             execute_params = get_build_parameters(execute_tc_params_text)\r
index 49df597df84b5f22335866da88136fffe0058a1f..accd6c9a9f239fe7ab3750457cdc6c7b14f8a3f4 100644 (file)
 150,"exclude: 1, 2, 3",donotremove
 151,EXCLUDE:,donotremove
 152,exclude:,donotremove
+153,support,supportsys
+154,suport,supportsys
+155,back,goback
+156,BACK,goback
+157,remove,removeapi
+158,remove api,removeapi