Move gtest_prod_util.h out of webrtc/test tree.
This is needed because the target is defined in webrtc/common.gyp
and its current location crosses package boundaries when generating
projects for some build systems.
NOTRY=True
Review URL: https://codereview.webrtc.org/1665603003
Cr-Commit-Position: refs/heads/master@{#11496}
diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn
index be824b7..6d84c50 100644
--- a/webrtc/BUILD.gn
+++ b/webrtc/BUILD.gn
@@ -246,12 +246,6 @@
}
}
-source_set("gtest_prod") {
- sources = [
- "test/testsupport/gtest_prod_util.h",
- ]
-}
-
if (rtc_enable_protobuf) {
proto_library("rtc_event_log_proto") {
sources = [
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn
index c3a3f0d..bebef8e 100644
--- a/webrtc/base/BUILD.gn
+++ b/webrtc/base/BUILD.gn
@@ -643,3 +643,9 @@
]
}
}
+
+source_set("gtest_prod") {
+ sources = [
+ "gtest_prod_util.h",
+ ]
+}
diff --git a/webrtc/base/base.gyp b/webrtc/base/base.gyp
index b5ee37e..3ae76db 100644
--- a/webrtc/base/base.gyp
+++ b/webrtc/base/base.gyp
@@ -746,5 +746,12 @@
}],
],
},
+ {
+ 'target_name': 'gtest_prod',
+ 'type': 'static_library',
+ 'sources': [
+ 'gtest_prod_util.h',
+ ],
+ },
],
}
diff --git a/webrtc/test/testsupport/gtest_prod_util.h b/webrtc/base/gtest_prod_util.h
similarity index 89%
rename from webrtc/test/testsupport/gtest_prod_util.h
rename to webrtc/base/gtest_prod_util.h
index 5370589..f0cb114 100644
--- a/webrtc/test/testsupport/gtest_prod_util.h
+++ b/webrtc/base/gtest_prod_util.h
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef WEBRTC_TEST_TESTSUPPORT_GTEST_PROD_UTIL_H_
-#define WEBRTC_TEST_TESTSUPPORT_GTEST_PROD_UTIL_H_
+#ifndef WEBRTC_BASE_GTEST_PROD_UTIL_H_
+#define WEBRTC_BASE_GTEST_PROD_UTIL_H_
// Define our own version of FRIEND_TEST here rather than including
// gtest_prod.h to avoid depending on any part of GTest in production code.
@@ -35,4 +35,4 @@
FRIEND_TEST_WEBRTC(test_case_name, FLAKY_##test_name); \
FRIEND_TEST_WEBRTC(test_case_name, FAILS_##test_name)
-#endif // WEBRTC_TEST_TESTSUPPORT_GTEST_PROD_UTIL_H_
+#endif // WEBRTC_BASE_GTEST_PROD_UTIL_H_
diff --git a/webrtc/common.gyp b/webrtc/common.gyp
index efffe13..3b5fe90 100644
--- a/webrtc/common.gyp
+++ b/webrtc/common.gyp
@@ -20,12 +20,5 @@
'typedefs.h',
],
},
- {
- 'target_name': 'gtest_prod',
- 'type': 'static_library',
- 'sources': [
- 'test/testsupport/gtest_prod_util.h',
- ],
- },
],
}
diff --git a/webrtc/common_audio/channel_buffer.h b/webrtc/common_audio/channel_buffer.h
index d906916..9f2fb96 100644
--- a/webrtc/common_audio/channel_buffer.h
+++ b/webrtc/common_audio/channel_buffer.h
@@ -14,9 +14,9 @@
#include <string.h>
#include "webrtc/base/checks.h"
+#include "webrtc/base/gtest_prod_util.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_audio/include/audio_util.h"
-#include "webrtc/test/testsupport/gtest_prod_util.h"
namespace webrtc {
diff --git a/webrtc/common_audio/resampler/sinc_resampler.h b/webrtc/common_audio/resampler/sinc_resampler.h
index 45ade0c..0980e2d 100644
--- a/webrtc/common_audio/resampler/sinc_resampler.h
+++ b/webrtc/common_audio/resampler/sinc_resampler.h
@@ -15,9 +15,9 @@
#define WEBRTC_COMMON_AUDIO_RESAMPLER_SINC_RESAMPLER_H_
#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/gtest_prod_util.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/system_wrappers/include/aligned_malloc.h"
-#include "webrtc/test/testsupport/gtest_prod_util.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/webrtc/modules/audio_coding/neteq/nack.h b/webrtc/modules/audio_coding/neteq/nack.h
index 17fef46..f30e459 100644
--- a/webrtc/modules/audio_coding/neteq/nack.h
+++ b/webrtc/modules/audio_coding/neteq/nack.h
@@ -14,9 +14,9 @@
#include <vector>
#include <map>
+#include "webrtc/base/gtest_prod_util.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/include/audio_coding_module_typedefs.h"
-#include "webrtc/test/testsupport/gtest_prod_util.h"
//
// The Nack class keeps track of the lost packets, an estimate of time-to-play
diff --git a/webrtc/modules/audio_processing/transient/transient_suppressor.h b/webrtc/modules/audio_processing/transient/transient_suppressor.h
index 5a6f117..489d71b 100644
--- a/webrtc/modules/audio_processing/transient/transient_suppressor.h
+++ b/webrtc/modules/audio_processing/transient/transient_suppressor.h
@@ -14,8 +14,8 @@
#include <deque>
#include <set>
+#include "webrtc/base/gtest_prod_util.h"
#include "webrtc/base/scoped_ptr.h"
-#include "webrtc/test/testsupport/gtest_prod_util.h"
#include "webrtc/typedefs.h"
namespace webrtc {
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe.h b/webrtc/modules/remote_bitrate_estimator/test/bwe.h
index 8d29de2..bd016cf 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe.h
@@ -16,7 +16,7 @@
#include <sstream>
#include <string>
-#include "webrtc/test/testsupport/gtest_prod_util.h"
+#include "webrtc/base/gtest_prod_util.h"
#include "webrtc/modules/remote_bitrate_estimator/test/packet.h"
#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
#include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h"
diff --git a/webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h b/webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h
index 2be13e0..81df278 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h
+++ b/webrtc/modules/remote_bitrate_estimator/test/metric_recorder.h
@@ -17,7 +17,7 @@
#include <vector>
#include "webrtc/base/common.h"
-#include "webrtc/test/testsupport/gtest_prod_util.h"
+#include "webrtc/base/gtest_prod_util.h"
namespace webrtc {
namespace testing {
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
index 82e2837..3621f9b 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h
@@ -16,13 +16,13 @@
#include <utility>
#include <vector>
+#include "webrtc/base/gtest_prod_util.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
#include "webrtc/modules/rtp_rtcp/source/packet_loss_stats.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
-#include "webrtc/test/testsupport/gtest_prod_util.h"
namespace webrtc {
diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn
index 3ecd903..54694b8 100644
--- a/webrtc/test/BUILD.gn
+++ b/webrtc/test/BUILD.gn
@@ -70,7 +70,7 @@
]
deps = [
- "..:gtest_prod",
+ "../base:gtest_prod",
"../system_wrappers",
"//testing/gmock",
"//testing/gtest",
diff --git a/webrtc/test/test.gyp b/webrtc/test/test.gyp
index 5bb7793..5b1e24d 100644
--- a/webrtc/test/test.gyp
+++ b/webrtc/test/test.gyp
@@ -133,7 +133,7 @@
'dependencies': [
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/testing/gmock.gyp:gmock',
- '<(webrtc_root)/common.gyp:gtest_prod',
+ '<(webrtc_root)/base/base.gyp:gtest_prod',
'<(webrtc_root)/system_wrappers/system_wrappers.gyp:system_wrappers',
],
'sources': [
diff --git a/webrtc/tools/BUILD.gn b/webrtc/tools/BUILD.gn
index 0daba4d..603e999 100644
--- a/webrtc/tools/BUILD.gn
+++ b/webrtc/tools/BUILD.gn
@@ -20,7 +20,7 @@
"simple_command_line_parser.h",
]
deps = [
- "..:gtest_prod",
+ "../base:gtest_prod",
]
configs += [ "..:common_config" ]
public_configs = [ "..:common_inherited_config" ]
diff --git a/webrtc/tools/internal_tools.gyp b/webrtc/tools/internal_tools.gyp
index 61000d1..bee8a8b 100644
--- a/webrtc/tools/internal_tools.gyp
+++ b/webrtc/tools/internal_tools.gyp
@@ -21,7 +21,7 @@
'simple_command_line_parser.cc',
],
'dependencies': [
- '<(webrtc_root)/common.gyp:gtest_prod',
+ '<(webrtc_root)/base/base.gyp:gtest_prod',
],
}, # command_line_parser
],
diff --git a/webrtc/tools/simple_command_line_parser.h b/webrtc/tools/simple_command_line_parser.h
index c7bed5c..960038b 100644
--- a/webrtc/tools/simple_command_line_parser.h
+++ b/webrtc/tools/simple_command_line_parser.h
@@ -16,7 +16,7 @@
#include <vector>
#include "webrtc/base/constructormagic.h"
-#include "webrtc/test/testsupport/gtest_prod_util.h"
+#include "webrtc/base/gtest_prod_util.h"
// This is a very basic command line parsing class. We pass the command line
// arguments and their number and the class forms a vector out of these. Than we