Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: third_party/grpc/templates/test/core/end2end/end2end_defs.include

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/grpc/templates/test/core/end2end/end2end_defs.include
diff --git a/third_party/tcmalloc/chromium/src/base/synchronization_profiling.h b/third_party/grpc/templates/test/core/end2end/end2end_defs.include
similarity index 67%
copy from third_party/tcmalloc/chromium/src/base/synchronization_profiling.h
copy to third_party/grpc/templates/test/core/end2end/end2end_defs.include
index cf02c218a111806189f71f7b528a83b5ceb164a4..929827e145334f44cf90408d20467eb21990b310 100644
--- a/third_party/tcmalloc/chromium/src/base/synchronization_profiling.h
+++ b/third_party/grpc/templates/test/core/end2end/end2end_defs.include
@@ -1,4 +1,7 @@
-/* Copyright (c) 2010, Google Inc.
+<%def name="end2end_selector(tests)">
+/*
+ *
+ * Copyright 2015-2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,24 +30,38 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * ---
- * Author: Chris Ruemmler
*/
-#ifndef BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
-#define BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
+<% tests = sorted(tests) %>\
+/* This file is auto-generated */
+
+#include "test/core/end2end/end2end_tests.h"
+#include <string.h>
+#include <grpc/support/log.h>
-#include "base/basictypes.h"
+% for test in tests:
+extern void ${test}(grpc_end2end_test_config config);
+% endfor
-namespace base {
+void grpc_end2end_tests(int argc, char **argv,
+ grpc_end2end_test_config config) {
+ int i;
-// We can do contention-profiling of SpinLocks, but the code is in
-// mutex.cc, which is not always linked in with spinlock. Hence we
-// provide a weak definition, which are used if mutex.cc isn't linked in.
+ if (argc <= 1) {
+% for test in tests:
+ ${test}(config);
+% endfor
+ return;
+ }
-// Submit the number of cycles the spinlock spent contending.
-ATTRIBUTE_WEAK extern void SubmitSpinLockProfileData(const void *, int64);
-extern void SubmitSpinLockProfileData(const void *contendedlock,
- int64 wait_cycles) {}
-}
-#endif // BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
+ for (i = 1; i < argc; i++) {
+% for test in tests:
+ if (0 == strcmp("${test}", argv[i])) {
+ ${test}(config);
+ continue;
+ }
+% endfor
+ gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]);
+ abort();
+ }
+}</%def>

Powered by Google App Engine
This is Rietveld 408576698