)]}'
{"tools/use_tempest_lib.sh":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1be867c2e8c8cf6b3a7c67127d9aac654f60f88a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cd $tmpdir"},{"line_number":35,"context_line":"        filename\u003d`basename $file`"},{"line_number":36,"context_line":"        lib_path\u003d`find ./ -name $filename`"},{"line_number":37,"context_line":"        num_lib_path\u003d`find ./ -name $filename | wc -l`"},{"line_number":38,"context_line":"        if [ $num_lib_path -ne 1 ]; then"},{"line_number":39,"context_line":"            if [ $num_lib_path -eq 0 ]; then"},{"line_number":40,"context_line":"                echo \"ERROR: $filename does not exist in tempest-lib.\""},{"line_number":41,"context_line":"            else"},{"line_number":42,"context_line":"                echo \"ERROR: Multiple $filename exist in tempest-lib.\""},{"line_number":43,"context_line":"            fi"},{"line_number":44,"context_line":"            failed\u003d$(( failed + 1))"},{"line_number":45,"context_line":"            cd - \u003e /dev/null"},{"line_number":46,"context_line":"            continue"},{"line_number":47,"context_line":"        fi"},{"line_number":48,"context_line":"        # Get the CHANGE_ID of tempest-lib patch where file was migrated"},{"line_number":49,"context_line":"        migration_change_id\u003d`git log  -n1 --grep \"Migrated\" -- $lib_path | grep \"Change-Id: \" | awk \u0027{print $2}\u0027`"},{"line_number":50,"context_line":"        MIGRATION_IDS\u003d`echo -e \"$MIGRATION_IDS\\n * $filename: $migration_change_id\"`"}],"source_content_type":"text/x-sh","patch_set":2,"id":"dae33548_25895127","line":47,"range":{"start_line":37,"start_character":0,"end_line":47,"end_character":10},"updated":"2016-02-16 07:53:48.000000000","message":"Nice catch but this will throw error in this case. How about searching the file with expected path in case of multiple files? like below-\n\n        num_lib_path\u003d`find ./ -name $filename | wc -l`\n        if [ $num_lib_path -gt 1 ]; then\n            tempest_dirname\u003d`dirname $file`\n            lib_dirname\u003d`echo $tempest_dirname | sed s@tempest\\/@tempest_lib/\\@`\n            if [ $service_client -eq 1 ]; then\n                lib_dirname\u003d`echo $lib_dirname | sed s@\\/json@@`\n            fi\n            lib_path\u003d`find $lib_dirname -name $filename`\n        fi\n\n        if [ -z $lib_path ]; then\n            echo \"ERROR: $filename does not exist in tempest-lib.\"\n            failed\u003d$(( failed + 1))\n            cd - \u003e /dev/null\n            continue\n        fi","commit_id":"a5fe6c6c05a5eb10b8886450064dbb1ca2d2a8bf"}]}
