def test_client_cycle(self): c = make_system_composition() w = ScalaBench('jython') f = DacapoHarness() s = Send() r = Receive() p = Print() c.jvm.workload = w c.flow = [f >> f >> s] j = Job(c, [r >> p]) self.assertFalse(j.check())
def test_wrapped_jvm(self): c = make_system_composition() c.jvm = ValgrindJVM('jvm') w = ScalaBench('jython') s = Send() r = Receive() p = Print() c.jvm.workload = w c.flow = [c.jvm >> ('valgrind_log', 'payload') >> s] j = Job(c, [r >> p]) self.assertTrue(j.check())
def test_wrong_output(self): c = make_system_composition() w = ScalaBench('jython') f = DacapoHarness() s = Send() r = Receive() p = Print() c.jvm.workload = w c.flow = [w >> ('a', 'stderr') >> f >> s] j = Job(c, [r >> p]) self.assertFalse(j.check())
def test_valid_job(self): c = make_system_composition() w = ScalaBench('jython') f = DacapoHarness() s = Send() r = Receive() p = Print() c.jvm.workload = w c.flow = [w >> f >> ('times', 'payload') >> s] j = Job(c, [r >> p]) self.assertTrue(j.check())
def test_server_cycle(self): c = make_system_composition() w = ScalaBench('jython') f = DacapoHarness() s = Send() r = Receive() p = Print() m = MockPipelineElement() m.inputs = Types(('a', int)) m.outputs = Types(('a', int)) c.jvm.workload = w c.flow = [w >> f >> s] j = Job(c, [r >> m >> m >> p]) self.assertFalse(j.check())
def test_no_workload(self): c = make_system_composition() j = Job(c, []) self.assertFalse(j.check())