Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[split] util/* compiling, testing and benchmarking with pants.

RB_ID=152697
  • Loading branch information...
commit 6b72b969522cbeb584a006e451a25e9aee077631 1 parent 1f11fc2
jsirois authored CI committed
Showing with 459 additions and 0 deletions.
  1. +14 −0 util-app/BUILD
  2. +3 −0  util-app/src/main/java/BUILD
  3. +7 −0 util-app/src/main/scala/BUILD
  4. +8 −0 util-app/src/test/scala/BUILD
  5. +7 −0 util-benchmark/BUILD
  6. +9 −0 util-benchmark/src/main/scala/BUILD
  7. +7 −0 util-class-preloader/BUILD
  8. +5 −0 util-class-preloader/src/main/java/BUILD
  9. +13 −0 util-codec/BUILD
  10. +7 −0 util-codec/src/main/scala/BUILD
  11. +9 −0 util-codec/src/test/scala/BUILD
  12. +13 −0 util-collection/BUILD
  13. +8 −0 util-collection/src/main/scala/BUILD
  14. +11 −0 util-collection/src/test/scala/BUILD
  15. +15 −0 util-core/BUILD
  16. +6 −0 util-core/src/main/java/BUILD
  17. +6 −0 util-core/src/main/scala/BUILD
  18. +8 −0 util-core/src/test/java/BUILD
  19. +12 −0 util-core/src/test/scala/BUILD
  20. +1 −0  util-core/src/test/scala/com/twitter/util/FutureSpec.scala
  21. +13 −0 util-eval/BUILD
  22. +7 −0 util-eval/src/main/scala/BUILD
  23. +3 −0  util-eval/src/test/resources/BUILD
  24. +13 −0 util-eval/src/test/scala/BUILD
  25. +13 −0 util-hashing/BUILD
  26. +6 −0 util-hashing/src/main/scala/BUILD
  27. +3 −0  util-hashing/src/test/resources/BUILD
  28. +14 −0 util-hashing/src/test/scala/BUILD
  29. +13 −0 util-jvm/BUILD
  30. +6 −0 util-jvm/src/main/scala/BUILD
  31. +12 −0 util-jvm/src/test/scala/BUILD
  32. +13 −0 util-logging/BUILD
  33. +11 −0 util-logging/src/main/scala/BUILD
  34. +10 −0 util-logging/src/test/scala/BUILD
  35. +13 −0 util-reflect/BUILD
  36. +10 −0 util-reflect/src/main/scala/BUILD
  37. +9 −0 util-reflect/src/test/scala/BUILD
  38. +13 −0 util-thrift/BUILD
  39. +13 −0 util-thrift/src/main/scala/BUILD
  40. +6 −0 util-thrift/src/test/java/BUILD
  41. +9 −0 util-thrift/src/test/scala/BUILD
  42. +13 −0 util-zk-common/BUILD
  43. +17 −0 util-zk-common/src/main/scala/BUILD
  44. +16 −0 util-zk-common/src/test/scala/BUILD
  45. +13 −0 util-zk/BUILD
  46. +8 −0 util-zk/src/main/scala/BUILD
  47. +13 −0 util-zk/src/test/scala/BUILD
View
14 util-app/BUILD
@@ -0,0 +1,14 @@
+maven_layout()
+
+jar_library(name='util-app',
+ dependencies=[
+ pants('util/util-app/src/main/scala'),
+ pants('util/util-app/src/main/java')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-app/src/test/scala')
+ ]
+)
View
3  util-app/src/main/java/BUILD
@@ -0,0 +1,3 @@
+java_library(name='java',
+ sources=rglobs('*.java')
+)
View
7 util-app/src/main/scala/BUILD
@@ -0,0 +1,7 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('util/util-app/src/main/java'),
+ pants('util/util-core/src/main/scala'),
+ ],
+ sources=rglobs('*.scala'),
+)
View
8 util-app/src/test/scala/BUILD
@@ -0,0 +1,8 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:scalatest_2.9.2'),
+ pants('util/util-app/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
7 util-benchmark/BUILD
@@ -0,0 +1,7 @@
+maven_layout()
+
+jar_library(name='util-benchmark',
+ dependencies=[
+ pants('util/util-benchmark/src/main/scala')
+ ]
+)
View
9 util-benchmark/src/main/scala/BUILD
@@ -0,0 +1,9 @@
+benchmark(name='scala',
+ dependencies=[
+ pants('3rdparty:caliper'),
+ pants('3rdparty:scala-library'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-jvm/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
7 util-class-preloader/BUILD
@@ -0,0 +1,7 @@
+maven_layout()
+
+jar_library(name='util-class-preloader',
+ dependencies=[
+ pants('util/util-class-preloader/src/main/java')
+ ]
+)
View
5 util-class-preloader/src/main/java/BUILD
@@ -0,0 +1,5 @@
+java_agent(name='java',
+ sources=rglobs('*.java'),
+ premain='com.twitter.classpreloader.ClassPreloader',
+ can_retransform=True
+)
View
13 util-codec/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-codec',
+ dependencies=[
+ pants('util/util-codec/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-codec/src/test/scala')
+ ]
+)
View
7 util-codec/src/main/scala/BUILD
@@ -0,0 +1,7 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('3rdparty:commons-codec'),
+ pants('util/util-core/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
9 util-codec/src/test/scala/BUILD
@@ -0,0 +1,9 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:mockito-all'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('util/util-codec/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
13 util-collection/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-collection',
+ dependencies=[
+ pants('util/util-collection/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-collection/src/test/scala')
+ ]
+)
View
8 util-collection/src/main/scala/BUILD
@@ -0,0 +1,8 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('3rdparty:commons-collections'),
+ pants('3rdparty:guava'),
+ pants('util/util-core/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
11 util-collection/src/test/scala/BUILD
@@ -0,0 +1,11 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:mockito-all'),
+ pants('3rdparty:scalatest_2.9.2'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('util/util-collection/src/main/scala'),
+ pants('util/util-core/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
15 util-core/BUILD
@@ -0,0 +1,15 @@
+maven_layout()
+
+jar_library(name='util-core',
+ dependencies=[
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-core/src/main/java')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-core/src/test/java'),
+ pants('util/util-core/src/test/scala')
+ ]
+)
View
6 util-core/src/main/java/BUILD
@@ -0,0 +1,6 @@
+java_library(name='java',
+ dependencies=[
+ pants('util/util-core/src/main/scala')
+ ],
+ sources=rglobs('*.java')
+)
View
6 util-core/src/main/scala/BUILD
@@ -0,0 +1,6 @@
+scala_library(name='scala',
+ sources=rglobs('*.scala'),
+ java_sources=[
+ pants('util/util-core/src/main/java')
+ ]
+)
View
8 util-core/src/test/java/BUILD
@@ -0,0 +1,8 @@
+junit_tests(name='java',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('util/util-core/src/main/java'),
+ pants('util/util-core/src/main/scala'),
+ ],
+ sources=rglobs('*.java')
+)
View
12 util-core/src/test/scala/BUILD
@@ -0,0 +1,12 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:mockito-all'),
+ pants('3rdparty:scalatest_2.9.2'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('3rdparty/com/twitter/common:objectsize'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-core/src/test/java'),
+ ],
+ sources=rglobs('*.scala')
+)
View
1  util-core/src/test/scala/com/twitter/util/FutureSpec.scala
@@ -948,6 +948,7 @@ class FutureSpec extends SpecificationWithJUnit with Mockito {
}
}
+ // TODO(John Sirois): Kill this mvn test hack when pants takes over.
"Java" should {
"work" in {
val test = new FutureTest()
View
13 util-eval/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-eval',
+ dependencies=[
+ pants('util/util-eval/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-eval/src/test/scala')
+ ]
+)
View
7 util-eval/src/main/scala/BUILD
@@ -0,0 +1,7 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('3rdparty:scala-compiler'),
+ pants('util/util-core/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
3  util-eval/src/test/resources/BUILD
@@ -0,0 +1,3 @@
+resources(name='resources',
+ sources=rglobs('*')
+)
View
13 util-eval/src/test/scala/BUILD
@@ -0,0 +1,13 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:mockito-all'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-eval/src/main/scala'),
+ ],
+ sources=rglobs('*.scala'),
+ resources=[
+ pants('util/util-eval/src/test/resources')
+ ]
+)
View
13 util-hashing/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-hashing',
+ dependencies=[
+ pants('util/util-hashing/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-hashing/src/test/scala')
+ ]
+)
View
6 util-hashing/src/main/scala/BUILD
@@ -0,0 +1,6 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('util/util-core/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
3  util-hashing/src/test/resources/BUILD
@@ -0,0 +1,3 @@
+resources(name='resources',
+ sources=rglobs('*')
+)
View
14 util-hashing/src/test/scala/BUILD
@@ -0,0 +1,14 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:commons-codec'),
+ pants('3rdparty:junit'),
+ pants('3rdparty:mockito-all'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-hashing/src/main/scala')
+ ],
+ sources=rglobs('*.scala'),
+ resources=[
+ pants('util/util-hashing/src/test/resources')
+ ]
+)
View
13 util-jvm/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-jvm',
+ dependencies=[
+ pants('util/util-jvm/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-jvm/src/test/scala')
+ ]
+)
View
6 util-jvm/src/main/scala/BUILD
@@ -0,0 +1,6 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('util/util-core/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
12 util-jvm/src/test/scala/BUILD
@@ -0,0 +1,12 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:mockito-all'),
+ pants('3rdparty:scalatest_2.9.2'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-jvm/src/main/scala'),
+ pants('util/util-logging/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
13 util-logging/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-logging',
+ dependencies=[
+ pants('util/util-logging/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-logging/src/test/scala')
+ ]
+)
View
11 util-logging/src/main/scala/BUILD
@@ -0,0 +1,11 @@
+scala_library(name='scala',
+ dependencies=[
+ # TODO(John Sirois): This is a bogus dependency for nearly all use cases - isolate
+ # com.twitter.logging.TestLogging to its own scala_library target and move users over.
+ pants('3rdparty:specs_2.9.2'),
+
+ pants('util/util-app/src/main/scala'),
+ pants('util/util-core/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
10 util-logging/src/test/scala/BUILD
@@ -0,0 +1,10 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty/:junit'),
+ pants('3rdparty/:mockito-all'),
+ pants('3rdparty/:specs_2.9.2'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-logging/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
13 util-reflect/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-reflect',
+ dependencies=[
+ pants('util/util-reflect/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-reflect/src/test/scala')
+ ]
+)
View
10 util-reflect/src/main/scala/BUILD
@@ -0,0 +1,10 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('3rdparty:asm'),
+ pants('3rdparty:asm-commons'),
+ pants('3rdparty:asm-util'),
+ pants('3rdparty:cglib'),
+ pants('util/util-core/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
9 util-reflect/src/test/scala/BUILD
@@ -0,0 +1,9 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-reflect/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
13 util-thrift/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-thrift',
+ dependencies=[
+ pants('util/util-thrift/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-thrift/src/test/scala')
+ ]
+)
View
13 util-thrift/src/main/scala/BUILD
@@ -0,0 +1,13 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('3rdparty:jackson-mapper-asl'),
+ pants('3rdparty:libthrift-0.5.0'),
+
+ # TODO(John Sirois): review if this is needed - slf4j backends should generally be specified
+ # at the dep leaves.
+ pants('3rdparty:slf4j-nop'),
+
+ pants('util/util-codec')
+ ],
+ sources=rglobs('*.scala')
+)
View
6 util-thrift/src/test/java/BUILD
@@ -0,0 +1,6 @@
+java_library(name='java',
+ dependencies=[
+ pants('3rdparty:libthrift-0.5.0'),
+ ],
+ sources=rglobs('*.java')
+)
View
9 util-thrift/src/test/scala/BUILD
@@ -0,0 +1,9 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:junit'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('util/util-thrift/src/main/scala'),
+ pants('util/util-thrift/src/test/java'),
+ ],
+ sources=rglobs('*.scala')
+)
View
13 util-zk-common/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-zk-common',
+ dependencies=[
+ pants('util/util-zk-common/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-zk-common/src/test/scala')
+ ]
+)
View
17 util-zk-common/src/main/scala/BUILD
@@ -0,0 +1,17 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('3rdparty:guava'),
+ pants('3rdparty:zookeeper'),
+ pants('3rdparty/com/twitter/common:quantity'),
+ pants('3rdparty/com/twitter/common:service-thrift'),
+ pants('3rdparty/com/twitter/common/zookeeper:client'),
+ pants('3rdparty/com/twitter/common/zookeeper:server-set'),
+ pants('util/util-collection/src/main/scala'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-eval/src/main/scala'),
+ pants('util/util-hashing/src/main/scala'),
+ pants('util/util-logging/src/main/scala'),
+ pants('util/util-zk/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
16 util-zk-common/src/test/scala/BUILD
@@ -0,0 +1,16 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:cglib'),
+ pants('3rdparty:guava'),
+ pants('3rdparty:jmock'),
+ pants('3rdparty:junit'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('3rdparty/com/twitter/common:net-util'),
+ pants('3rdparty/com/twitter/common:service-thrift'),
+ pants('3rdparty/com/twitter/common/zookeeper:client'),
+ pants('3rdparty/com/twitter/common/zookeeper:server-set'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-zk-common/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
View
13 util-zk/BUILD
@@ -0,0 +1,13 @@
+maven_layout()
+
+jar_library(name='util-zk',
+ dependencies=[
+ pants('util/util-zk/src/main/scala')
+ ]
+)
+
+jar_library(name='tests',
+ dependencies=[
+ pants('util/util-zk/src/test/scala')
+ ]
+)
View
8 util-zk/src/main/scala/BUILD
@@ -0,0 +1,8 @@
+scala_library(name='scala',
+ dependencies=[
+ pants('3rdparty:zookeeper'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-logging/src/main/scala')
+ ],
+ sources=rglobs('*.scala')
+)
View
13 util-zk/src/test/scala/BUILD
@@ -0,0 +1,13 @@
+junit_tests(name='scala',
+ dependencies=[
+ pants('3rdparty:cglib'),
+ pants('3rdparty:jmock'),
+ pants('3rdparty:junit'),
+ pants('3rdparty:mockito-all'),
+ pants('3rdparty:specs_2.9.2'),
+ pants('3rdparty:zookeeper'),
+ pants('util/util-core/src/main/scala'),
+ pants('util/util-zk/src/main/scala'),
+ ],
+ sources=rglobs('*.scala')
+)
Please sign in to comment.
Something went wrong with that request. Please try again.