예제 #1
0
 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())
예제 #2
0
 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())
예제 #3
0
 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())
예제 #4
0
    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())
예제 #5
0
 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())
예제 #6
0
 def test_no_workload(self):
     c = make_system_composition()
     j = Job(c, [])
     self.assertFalse(j.check())