Exemplo n.º 1
0
def test_piglittest_interpret_result_subtest():
    """ PiglitTest.interpret_result() works with subtests """
    test = PiglitTest('foo')
    test.result['out'] = ('PIGLIT: {"result": "pass"}\n'
                          'PIGLIT: {"subtest": {"subtest": "pass"}}\n')
    test.interpret_result()
    assert test.result['subtest']['subtest'] == 'pass'
Exemplo n.º 2
0
def test_piglittest_interpret_result_subtest():
    """ PiglitTest.interpret_result() works with subtests """
    test = PiglitTest('foo')
    test.result['out'] = ('PIGLIT: {"result": "pass"}\n'
                          'PIGLIT: {"subtest": {"subtest": "pass"}}\n')
    test.interpret_result()
    assert test.result['subtest']['subtest'] == 'pass'
Exemplo n.º 3
0
def test_piglitest_no_clobber():
    """ PiglitTest.interpret_result() does not clobber subtest entires """
    test = PiglitTest(['a', 'command'])
    test.result['out'] = (
        'PIGLIT: {"result": "pass"}\n'
        'PIGLIT: {"subtest": {"test1": "pass"}}\n'
        'PIGLIT: {"subtest": {"test2": "pass"}}\n'
    )
    test.interpret_result()

    nt.assert_dict_equal(test.result['subtest'],
                         {'test1': 'pass', 'test2': 'pass'})
Exemplo n.º 4
0
def test_piglitest_no_clobber():
    """ PiglitTest.interpret_result() does not clobber subtest entires """
    test = PiglitTest(['a', 'command'])
    test.result['out'] = (
        'PIGLIT: {"result": "pass"}\n'
        'PIGLIT: {"subtest": {"test1": "pass"}}\n'
        'PIGLIT: {"subtest": {"test2": "pass"}}\n'
    )
    test.interpret_result()

    nt.assert_dict_equal(test.result['subtest'],
                         {'test1': 'pass', 'test2': 'pass'})
Exemplo n.º 5
0
def test_piglittest_interpret_result():
    """ PiglitTest.interpret_result() works no subtests """
    test = PiglitTest('foo')
    test.result['out'] = 'PIGLIT: {"result": "pass"}\n'
    test.interpret_result()
    assert test.result['result'] == 'pass'
Exemplo n.º 6
0
def add_concurrent_test(group, name, args):
    test = PiglitTest(args)
    test.run_concurrent = true
    group[name] = PiglitTest(args)
Exemplo n.º 7
0
def add_plain_test(group, name, args):
    group[name] = PiglitTest(args)
Exemplo n.º 8
0
Arquivo: cl.py Projeto: groleo/piglit
def add_concurrent_test(group, name, args):
        test = PiglitTest(args)
        test.run_concurrent = true;
        group[name] = PiglitTest(args)
Exemplo n.º 9
0
def test_piglittest_interpret_result():
    """ PiglitTest.interpret_result() works no subtests """
    test = PiglitTest('foo')
    test.result['out'] = 'PIGLIT: {"result": "pass"}\n'
    test.interpret_result()
    assert test.result['result'] == 'pass'
Exemplo n.º 10
0
def test_initialize_piglittest():
    """ Test that PiglitTest initializes correctly """
    PiglitTest('/bin/true')