Beispiel #1
0
    def is_test(source_set):
      if source_set.is_test:
        return True

      # Non test targets that otherwise live in test target roots (say a java_library), must
      # be marked as test for IDEA to correctly link the targets with the test code that uses
      # them.
      base = source_set.source_base
      if base not in is_test_by_base:
        is_test_by_base[base] = any(map(is_test_target_type, SourceRoot.types(base)))
      istest = is_test_by_base[base]
      if istest:
        self.context.log.debug('Marked non-test source set as test (%s, %s)' % (
          source_set.source_base, source_set.path
        ))
      return istest
Beispiel #2
0
    def is_test(source_set):
      if source_set.is_test:
        return True

      # Non test targets that otherwise live in test target roots (say a java_library), must
      # be marked as test for IDEA to correctly link the targets with the test code that uses
      # them.
      base = source_set.source_base
      if base not in is_test_by_base:
        is_test_by_base[base] = any(map(is_test_target_type, SourceRoot.types(base)))
      istest = is_test_by_base[base]
      if istest:
        self.context.log.debug('Marked non-test source set as test (%s, %s)' % (
          source_set.source_base, source_set.path
        ))
      return istest
Beispiel #3
0
 def _create_new_target(self, target_base, target_type, *args, **kwargs):
   if not os.path.exists(target_base):
     os.makedirs(target_base)
   SourceRoot.register(target_base, target_type)
   with ParseContext.temp(target_base):
     return target_type(*args, **kwargs)
Beispiel #4
0
 def _create_new_target(self, target_base, target_type, *args, **kwargs):
     if not os.path.exists(target_base):
         os.makedirs(target_base)
     SourceRoot.register(target_base, target_type)
     with ParseContext.temp(target_base):
         return target_type(*args, **kwargs)