blob: 9841c7544e2de2af3e0968504baa2289064947a0 [file] [log] [blame]
FAKE_BUCK_CONFIG_SRCS = [
'FakeBuckConfig.java',
'FakeBuckEnvironment.java',
]
STANDARD_TEST_SRCS = [
'**/*Test.java',
]
java_library(
name = 'FakeBuckConfig',
srcs = FAKE_BUCK_CONFIG_SRCS,
deps = [
'//src/com/facebook/buck/cli:config',
'//src/com/facebook/buck/event:event',
'//src/com/facebook/buck/io:io',
'//src/com/facebook/buck/model:model',
'//src/com/facebook/buck/parser:rule_pattern',
'//src/com/facebook/buck/rules:build_rule',
'//src/com/facebook/buck/rules:rules',
'//test/com/facebook/buck/testutil:testutil',
'//third-party/java/easymock:easymock',
'//third-party/java/guava:guava',
'//third-party/java/jsr:jsr305',
],
exported_deps = [
# Clients of `new FakeBuckConfig(ImmutableMap)` also need to have
# com.facebook.buck.util.environment.Platform on their classpath in order to compile.
'//src/com/facebook/buck/util/environment:platform',
],
visibility = [
'PUBLIC',
],
)
java_library(
name = 'testutil',
srcs = glob(['*.java'], excludes = FAKE_BUCK_CONFIG_SRCS + STANDARD_TEST_SRCS),
deps = [
':FakeBuckConfig',
'//src/com/facebook/buck/android:utils',
'//src/com/facebook/buck/cli:cli',
'//src/com/facebook/buck/cli:config',
'//src/com/facebook/buck/event:event',
'//src/com/facebook/buck/graph:graph',
'//src/com/facebook/buck/io:io',
'//src/com/facebook/buck/model:model',
'//src/com/facebook/buck/parser:config',
'//src/com/facebook/buck/parser:parser',
'//src/com/facebook/buck/parser:rule_pattern',
'//src/com/facebook/buck/rules:build_rule',
'//src/com/facebook/buck/rules:rules',
'//src/com/facebook/buck/rules:types',
'//src/com/facebook/buck/timing:timing',
'//src/com/facebook/buck/util:io',
'//src/com/facebook/buck/util:util',
'//src/com/facebook/buck/util/environment:platform',
'//test/com/facebook/buck/android:utils',
'//test/com/facebook/buck/event:testutil',
'//test/com/facebook/buck/java:testutil',
'//test/com/facebook/buck/rules:testutil',
'//test/com/facebook/buck/testutil:testutil',
'//test/com/facebook/buck/testutil/integration:integration',
'//test/com/facebook/buck/timing:testutil',
'//test/com/facebook/buck/util:testutil',
'//third-party/java/args4j:args4j',
'//third-party/java/guava:guava',
'//third-party/java/ddmlib:ddmlib',
'//third-party/java/jackson:jackson-core',
'//third-party/java/jackson:jackson-databind',
'//third-party/java/jsr:jsr305',
'//third-party/java/junit:junit',
],
visibility = [
'PUBLIC',
],
)
java_test(
name = 'cli',
srcs = glob(STANDARD_TEST_SRCS),
resources = glob(['testdata/**'], include_dotfiles=True),
source_under_test = [
'//src/com/facebook/buck/cli:cli',
],
deps = [
':FakeBuckConfig',
':testutil',
'//src/com/facebook/buck/android:exceptions',
'//src/com/facebook/buck/android:packageable',
'//src/com/facebook/buck/android:rules',
'//src/com/facebook/buck/android:utils',
'//src/com/facebook/buck/apple:rules',
'//src/com/facebook/buck/cli:cli',
'//src/com/facebook/buck/cli:config',
'//src/com/facebook/buck/cli:events',
'//src/com/facebook/buck/command:command',
'//src/com/facebook/buck/cxx:rules',
'//src/com/facebook/buck/event:event',
'//src/com/facebook/buck/graph:graph',
'//src/com/facebook/buck/io:io',
'//src/com/facebook/buck/java/intellij:intellij',
'//src/com/facebook/buck/java:classhash',
'//src/com/facebook/buck/java:rules',
'//src/com/facebook/buck/java:support',
'//src/com/facebook/buck/json:json',
'//src/com/facebook/buck/model:model',
'//src/com/facebook/buck/parser:config',
'//src/com/facebook/buck/parser:parser',
'//src/com/facebook/buck/parser:rule_pattern',
'//src/com/facebook/buck/rules:build_rule',
'//src/com/facebook/buck/rules:rules',
'//src/com/facebook/buck/rules:types',
'//src/com/facebook/buck/step:step',
'//src/com/facebook/buck/test/result/type:type',
'//src/com/facebook/buck/test:test',
'//src/com/facebook/buck/timing:timing',
'//src/com/facebook/buck/util/environment:platform',
'//src/com/facebook/buck/util:constants',
'//src/com/facebook/buck/util:exceptions',
'//src/com/facebook/buck/util:io',
'//src/com/facebook/buck/util:util',
'//test/com/facebook/buck/android:testutil',
'//test/com/facebook/buck/android:utils',
'//test/com/facebook/buck/apple:testutil',
'//test/com/facebook/buck/event:testutil',
'//test/com/facebook/buck/io:testutil',
'//test/com/facebook/buck/java:testutil',
'//test/com/facebook/buck/model:BuildTargetFactory',
'//test/com/facebook/buck/rules:testutil',
'//test/com/facebook/buck/shell:testutil',
'//test/com/facebook/buck/step:testutil',
'//test/com/facebook/buck/testutil/integration:integration',
'//test/com/facebook/buck/testutil:testutil',
'//test/com/facebook/buck/timing:testutil',
'//test/com/facebook/buck/util:testutil',
'//third-party/java/args4j:args4j',
'//third-party/java/ddmlib:ddmlib',
'//third-party/java/easymock:easymock',
'//third-party/java/gson:gson',
'//third-party/java/guava:guava',
'//third-party/java/hamcrest:hamcrest-core',
'//third-party/java/hamcrest:hamcrest-library',
'//third-party/java/ini4j:ini4j',
'//third-party/java/jackson:jackson-core',
'//third-party/java/jackson:jackson-databind',
'//third-party/java/jackson:jackson-datatype-jdk7',
'//third-party/java/jetty:jetty',
'//third-party/java/jsr:jsr305',
'//third-party/java/junit:junit',
'//third-party/java/nailgun:nailgun',
],
)