Extract functionality of test_main into separate library.

Extract functionality of test_main into separate library to be able to
reuse it if another main will be required.

Bug: webrtc:5996
Change-Id: I2925b4240bd0e4fb884b43bb16667ca2d6216bbd
Reviewed-on: https://webrtc-review.googlesource.com/c/105921
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25172}
diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
index 44f9a8b..9bad88c 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -1479,6 +1479,7 @@
              "../../rtc_base/system:arch",
              "../../test:test_main",
              "//testing/gtest",
+             "//test:test_support",
            ] + audio_coding_deps
 
     data = audio_decoder_unittests_resources
@@ -1597,6 +1598,7 @@
       "../../rtc_base:rtc_base_approved",
       "../../test:test_main",
       "../audio_processing",
+      "//test:test_support",
       "//testing/gtest",
     ]
   }
@@ -1957,6 +1959,7 @@
       "../../rtc_base:rtc_base_approved",
       "../../test:fileutils",
       "../../test:test_main",
+      "//test:test_support",
       "//testing/gtest",
     ]
   }