| java_library( |
| name = 'base', |
| srcs = [ |
| 'BaseRunner.java', |
| 'CheckDependency.java', |
| 'TestResult.java', |
| ], |
| exported_deps = [ |
| '//src/com/facebook/buck/test/result/type:type', |
| '//src/com/facebook/buck/test/selectors:selectors', |
| ], |
| ) |
| |
| java_library( |
| name = 'junit', |
| srcs = [ |
| 'BuckBlockJUnit4ClassRunner.java', |
| 'DelegateRunnerWithTimeout.java', |
| 'DelegateRunNotifier.java', |
| 'JUnitMain.java', |
| 'JUnitRunner.java', |
| ], |
| deps = [ |
| ':base', |
| # IMPORTANT! This library limits itself to types that are available in both the JDK and Android |
| # Java API. The objective is to limit the set of files added to the ClassLoader that runs the |
| # test, as not to interfere with the results of the test. |
| '//third-party/java/junit:junit', |
| '//src/com/facebook/buck/util/concurrent:concurrent_for_junit_runner', |
| ], |
| visibility = [ |
| '//test/com/facebook/buck/junit:junit', |
| ], |
| ) |
| |
| java_library( |
| name = 'testng', |
| srcs = [ |
| 'TestNGMain.java', |
| 'TestNGRunner.java', |
| ], |
| deps = [ |
| ':base', |
| '//third-party/java/testng:testng', |
| ], |
| visibility = [ |
| ], |
| ) |
| |
| java_binary( |
| name = 'junit-bin', |
| deps = [ |
| ':testng', |
| ':junit', |
| ], |
| visibility = [ |
| 'PUBLIC', |
| ], |
| ) |
| |
| # Strip out classes we don't want automatically added to the classpath for |
| # tests, leaving just the extra buck classes. |
| genrule( |
| name = 'junit-bin-fixed', |
| out = 'junit-bin-fixed.jar', |
| cmd = 'unzip -q -o $(location :junit-bin) -d . && zip $OUT -r . -i com/facebook/buck/\*', |
| srcs = [ |
| ':junit-bin', |
| ], |
| visibility = [ |
| 'PUBLIC', |
| ], |
| ) |