Make generated lit test target names match common internal format

It's generally good practice to prefix with the macro name, but internally bazel lit tests use this format and it's confusing for developers working across code bases to have both. We're unlikely to get conflicts here as we're probably not going to be generating multiple tests from the same source file.

PiperOrigin-RevId: 293231908
diff --git a/build_tools/cmake/iree_lit_test.cmake b/build_tools/cmake/iree_lit_test.cmake
index 616ffe8..fbb519d 100644
--- a/build_tools/cmake/iree_lit_test.cmake
+++ b/build_tools/cmake/iree_lit_test.cmake
@@ -44,7 +44,7 @@
   set(_NAME "${_PACKAGE_NAME}_${_RULE_NAME}")
 
   get_filename_component(_TEST_FILE_PATH ${_RULE_TEST_FILE} ABSOLUTE)
-  
+
   add_test(
     NAME ${_NAME}
     COMMAND ${CMAKE_SOURCE_DIR}/iree/tools/run_lit.sh "${_TEST_FILE_PATH}"
@@ -84,7 +84,7 @@
     get_filename_component(_TEST_BASENAME ${_TEST_FILE} NAME)
     iree_lit_test(
       NAME
-        "${_RULE_NAME}_${_TEST_BASENAME}_test"
+        "${_TEST_BASENAME}.test"
       TEST_FILE
         "${_TEST_FILE}"
       DATA
diff --git a/iree/lit_test.bzl b/iree/lit_test.bzl
index 12f4f8e..50a5029 100644
--- a/iree/lit_test.bzl
+++ b/iree/lit_test.bzl
@@ -62,7 +62,10 @@
     """
     tests = []
     for test_file in srcs:
-        test_name = "%s_%s_test" % (name, test_file)
+        # It's generally good practice to prefix any generated names with the
+        # macro name, but we're trying to match the style of the names that are
+        # used for LLVM internally.
+        test_name = "%s.test" % (test_file)
         iree_lit_test(
             name = test_name,
             test_file = test_file,