Exemple #1
0
    def setUp(self):
        build_root = os.path.join(os.path.dirname(__file__), 'examples',
                                  'scheduler_inputs')
        self.spec_parser = CmdLineSpecParser(build_root)
        self.scheduler = setup_json_scheduler(build_root)
        self.engine = LocalSerialEngine(self.scheduler)

        self.guava = Address.parse('3rdparty/jvm:guava')
        self.thrift = Address.parse('src/thrift/codegen/simple')
        self.java = Address.parse('src/java/codegen/simple')
        self.java_simple = Address.parse('src/java/simple')
        self.java_multi = Address.parse('src/java/multiple_classpath_entries')
        self.no_variant_thrift = Address.parse(
            'src/java/codegen/selector:conflict')
        self.unconfigured_thrift = Address.parse(
            'src/thrift/codegen/unconfigured')
        self.resources = Address.parse('src/resources/simple')
        self.consumes_resources = Address.parse('src/java/consumes_resources')
        self.consumes_managed_thirdparty = Address.parse(
            'src/java/managed_thirdparty')
        self.managed_guava = Address.parse('3rdparty/jvm/managed:guava')
        self.managed_hadoop = Address.parse(
            '3rdparty/jvm/managed:hadoop-common')
        self.managed_resolve_latest = Address.parse(
            '3rdparty/jvm/managed:latest-hadoop')
        self.inferred_deps = Address.parse('src/scala/inferred_deps')
Exemple #2
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.graph, self.scheduler = setup_json_scheduler(build_root)

    self.guava = self.graph.resolve(Address.parse('3rdparty/jvm:guava'))
    self.thrift = self.graph.resolve(Address.parse('src/thrift/codegen/simple'))
    self.java = self.graph.resolve(Address.parse('src/java/codegen/simple'))
Exemple #3
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.graph, self.scheduler = setup_json_scheduler(build_root)

    def resolve(spec):
      return self.graph.resolve(Address.parse(spec))

    self.java = resolve('src/java/codegen/simple')
Exemple #4
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.graph, self.scheduler = setup_json_scheduler(build_root)

    self.guava = self.graph.resolve(Address.parse('3rdparty/jvm:guava'))
    self.thrift = self.graph.resolve(Address.parse('src/thrift/codegen/simple'))
    self.java = self.graph.resolve(Address.parse('src/java/codegen/simple'))
    self.java_multi = self.graph.resolve(Address.parse('src/java/multiple_classpath_entries'))
    self.unconfigured_thrift = self.graph.resolve(Address.parse('src/thrift/codegen/unconfigured'))
Exemple #5
0
    def setUp(self):
        build_root = os.path.join(os.path.dirname(__file__), "examples", "scheduler_inputs")
        self.graph, self.scheduler = setup_json_scheduler(build_root)

        self.guava = self.graph.resolve(Address.parse("3rdparty/jvm:guava"))
        self.thrift = self.graph.resolve(Address.parse("src/thrift/codegen/simple"))
        self.java = self.graph.resolve(Address.parse("src/java/codegen/simple"))
        self.java_multi = self.graph.resolve(Address.parse("src/java/multiple_classpath_entries"))
        self.unconfigured_thrift = self.graph.resolve(Address.parse("src/thrift/codegen/unconfigured"))
Exemple #6
0
    def setUp(self):
        build_root = os.path.join(os.path.dirname(__file__), 'examples',
                                  'scheduler_inputs')
        self.graph, self.scheduler = setup_json_scheduler(build_root)

        def resolve(spec):
            return self.graph.resolve(Address.parse(spec))

        self.java = resolve('src/java/codegen/simple')
Exemple #7
0
def visualize_build_request(build_root, goals, subjects):
  scheduler, storage = setup_json_scheduler(build_root)
  execution_request = scheduler.build_request(goals, subjects)
  # NB: Calls `reduce` independently of `execute`, in order to render a graph before validating it.
  engine = LocalSerialEngine(scheduler, storage)
  engine.start()
  try:
    engine.reduce(execution_request)
    visualize_execution_graph(scheduler, storage, execution_request)
  finally:
    engine.close()
Exemple #8
0
def visualize_build_request(build_root, goals, subjects):
    scheduler, storage = setup_json_scheduler(build_root)
    execution_request = scheduler.build_request(goals, subjects)
    # NB: Calls `reduce` independently of `execute`, in order to render a graph before validating it.
    engine = LocalSerialEngine(scheduler, storage)
    engine.start()
    try:
        engine.reduce(execution_request)
        visualize_execution_graph(scheduler, storage, execution_request)
    finally:
        engine.close()
Exemple #9
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.graph, self.scheduler = setup_json_scheduler(build_root)
    self.engine = LocalSerialEngine(self.scheduler)

    self.guava = self.graph.resolve(Address.parse('3rdparty/jvm:guava'))
    self.thrift = self.graph.resolve(Address.parse('src/thrift/codegen/simple'))
    self.java = self.graph.resolve(Address.parse('src/java/codegen/simple'))
    self.java_multi = self.graph.resolve(Address.parse('src/java/multiple_classpath_entries'))
    self.unconfigured_thrift = self.graph.resolve(Address.parse('src/thrift/codegen/unconfigured'))
    self.resources = self.graph.resolve(Address.parse('src/resources/simple'))
    self.consumes_resources = self.graph.resolve(Address.parse('src/java/consumes_resources'))
    self.consumes_managed_thirdparty = self.graph.resolve(Address.parse('src/java/managed_thirdparty'))
    self.managed_guava = self.graph.resolve(Address.parse('3rdparty/jvm/managed:guava'))
    self.managed_hadoop = self.graph.resolve(Address.parse('3rdparty/jvm/managed:hadoop-common'))
Exemple #10
0
    def setUp(self):
        build_root = os.path.join(os.path.dirname(__file__), "examples", "scheduler_inputs")
        self.graph, self.scheduler = setup_json_scheduler(build_root)
        self.engine = LocalSerialEngine(self.scheduler)

        self.guava = self.graph.resolve(Address.parse("3rdparty/jvm:guava"))
        self.thrift = self.graph.resolve(Address.parse("src/thrift/codegen/simple"))
        self.java = self.graph.resolve(Address.parse("src/java/codegen/simple"))
        self.java_multi = self.graph.resolve(Address.parse("src/java/multiple_classpath_entries"))
        self.unconfigured_thrift = self.graph.resolve(Address.parse("src/thrift/codegen/unconfigured"))
        self.resources = self.graph.resolve(Address.parse("src/resources/simple"))
        self.consumes_resources = self.graph.resolve(Address.parse("src/java/consumes_resources"))
        self.consumes_managed_thirdparty = self.graph.resolve(Address.parse("src/java/managed_thirdparty"))
        self.managed_guava = self.graph.resolve(Address.parse("3rdparty/jvm/managed:guava"))
        self.managed_hadoop = self.graph.resolve(Address.parse("3rdparty/jvm/managed:hadoop-common"))
Exemple #11
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.scheduler = setup_json_scheduler(build_root)
    self.engine = LocalSerialEngine(self.scheduler)

    self.guava = Address.parse('3rdparty/jvm:guava')
    self.thrift = Address.parse('src/thrift/codegen/simple')
    self.java = Address.parse('src/java/codegen/simple')
    self.java_simple = Address.parse('src/java/simple')
    self.java_multi = Address.parse('src/java/multiple_classpath_entries')
    self.unconfigured_thrift = Address.parse('src/thrift/codegen/unconfigured')
    self.resources = Address.parse('src/resources/simple')
    self.consumes_resources = Address.parse('src/java/consumes_resources')
    self.consumes_managed_thirdparty = Address.parse('src/java/managed_thirdparty')
    self.managed_guava = Address.parse('3rdparty/jvm/managed:guava')
    self.managed_hadoop = Address.parse('3rdparty/jvm/managed:hadoop-common')
    self.inferred_deps = Address.parse('src/scala/inferred_deps')
Exemple #12
0
    def setUp(self):
        build_root = os.path.join(os.path.dirname(__file__), "examples", "scheduler_inputs")
        self.spec_parser = CmdLineSpecParser(build_root)
        self.scheduler, storage = setup_json_scheduler(build_root)
        self.storage = storage
        self.engine = LocalSerialEngine(self.scheduler, storage)

        self.guava = Address.parse("3rdparty/jvm:guava")
        self.thrift = Address.parse("src/thrift/codegen/simple")
        self.java = Address.parse("src/java/codegen/simple")
        self.java_simple = Address.parse("src/java/simple")
        self.java_multi = Address.parse("src/java/multiple_classpath_entries")
        self.no_variant_thrift = Address.parse("src/java/codegen/selector:conflict")
        self.unconfigured_thrift = Address.parse("src/thrift/codegen/unconfigured")
        self.resources = Address.parse("src/resources/simple")
        self.consumes_resources = Address.parse("src/java/consumes_resources")
        self.consumes_managed_thirdparty = Address.parse("src/java/managed_thirdparty")
        self.managed_guava = Address.parse("3rdparty/jvm/managed:guava")
        self.managed_hadoop = Address.parse("3rdparty/jvm/managed:hadoop-common")
        self.managed_resolve_latest = Address.parse("3rdparty/jvm/managed:latest-hadoop")
        self.inferred_deps = Address.parse("src/scala/inferred_deps")
Exemple #13
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.scheduler, self.storage = setup_json_scheduler(build_root, debug=True)

    self.java = Address.parse('src/java/codegen/simple')
Exemple #14
0
def visualize_build_request(build_root, build_request):
  _, scheduler = setup_json_scheduler(build_root)
  execution_graph = scheduler.execution_graph(build_request)
  visualize_execution_graph(execution_graph)
Exemple #15
0
def visualize_build_request(build_root, build_request):
  scheduler = setup_json_scheduler(build_root)
  LocalSerialEngine(scheduler).reduce(build_request)
  visualize_execution_graph(scheduler)
Exemple #16
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.scheduler = setup_json_scheduler(build_root)
    self.spec_parser = CmdLineSpecParser(build_root)

    self.java = Address.parse('src/java/codegen/simple')
Exemple #17
0
def visualize_build_request(build_root, build_request):
    scheduler = setup_json_scheduler(build_root)
    # NB: Calls `reduce` independently of `execute`, in order to render a graph before validating it.
    LocalSerialEngine(scheduler).reduce(build_request)
    visualize_execution_graph(scheduler, build_request)
    scheduler.validate()
Exemple #18
0
def visualize_build_request(build_root, build_request):
    _, scheduler = setup_json_scheduler(build_root)
    execution_graph = scheduler.execution_graph(build_request)
    visualize_execution_graph(execution_graph)
Exemple #19
0
  def setUp(self):
    build_root = os.path.join(os.path.dirname(__file__), 'examples', 'scheduler_inputs')
    self.scheduler, self.storage = setup_json_scheduler(build_root, debug=True)
    self.cache = Cache.create(Storage.create())

    self.java = Address.parse('src/java/codegen/simple')
Exemple #20
0
def visualize_build_request(build_root, build_request):
  scheduler = setup_json_scheduler(build_root)
  # NB: Calls `reduce` independently of `execute`, in order to render a graph before validating it.
  LocalSerialEngine(scheduler).reduce(build_request)
  visualize_execution_graph(scheduler, build_request)
  scheduler.validate()