-
-
Save nitay/54417972b50419f0d525b7bc545ff323 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pprint | |
| from pants.backend.jvm.targets.java_tests import JavaTests | |
| from pants.build_graph.build_file_aliases import BuildFileAliases | |
| pp = pprint.PrettyPrinter(indent=4) | |
| class AiqJavaTests(JavaTests): | |
| def __init__(self, parse_context, **kwargs): | |
| self.parse_context = parse_context | |
| self.kwargs = kwargs | |
| def __call__(self, **kwargs): | |
| base_deps = [ | |
| '3rdparty/com/h2database:h2', # H2 database for sorm test DB | |
| '3rdparty/ch/qos/logback:logback-classic', # runtime logback implementation | |
| '3rdparty/org/slf4j:redirects', # redirect all logging to slf4j-api | |
| '3rdparty/org/specs2', # specs2 library | |
| 'config/src/test/resources' # test configs like logback | |
| ] | |
| kwargs['dependencies'] = base_deps + kwargs.get('dependencies', []) | |
| self.kwargs.update(**kwargs) | |
| self.parse_context.create_object('java_tests', self.kwargs) | |
| def build_file_aliases(): | |
| return BuildFileAliases( | |
| targets={ | |
| 'aiq_junit_tests': AiqJavaTests | |
| } | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment