Exemplo n.º 1
0
def test_skip0007():
    config = Config()

    with pytest.raises(ValueError) as e:
        config.should_skip("wobble")

    assert e.value.message == "bad benchmark key: wobble"
Exemplo n.º 2
0
def test_skip0007():
    config = Config()

    with pytest.raises(ValueError) as e:
        config.should_skip("wobble")

    assert e.value.args[0] == "bad benchmark key: wobble"
Exemplo n.º 3
0
def test_skip0006():
    config = Config()
    config.SKIP = ["*:*:*"]

    assert config.should_skip("mybench:CPython:default-python")
    assert config.should_skip("myotherbench:CPython:default-python")
    assert config.should_skip("mybench:PyPy:default-python")
    assert config.should_skip("mybench:CPython:special-python")
Exemplo n.º 4
0
def test_skip0006():
    config = Config()
    config.SKIP = ["*:*:*"]

    assert config.should_skip("mybench:CPython:default-python")
    assert config.should_skip("myotherbench:CPython:default-python")
    assert config.should_skip("mybench:PyPy:default-python")
    assert config.should_skip("mybench:CPython:special-python")
Exemplo n.º 5
0
def test_skip0001():
    path = os.path.join(TEST_DIR, "skips.krun")
    config = Config(path)
    expected = ["*:PyPy:*",
                "*:CPython:*",
                "*:Hotspot:*",
                "*:Graal:*",
                "*:LuaJIT:*",
                "*:HHVM:*",
                "*:TruffleRuby:*",
                "*:V8:*",
                ]
    for triplet in expected:
        assert config.should_skip(triplet)
    assert config.should_skip("nbody:HHVM:default-php")
    assert not config.should_skip("nbody:MYVM:default-php")
Exemplo n.º 6
0
def test_skip0001():
    path = os.path.join(TEST_DIR, "skips.krun")
    config = Config(path)
    expected = ["*:PyPy:*",
                "*:CPython:*",
                "*:Hotspot:*",
                "*:Graal:*",
                "*:LuaJIT:*",
                "*:HHVM:*",
                "*:JRubyTruffle:*",
                "*:V8:*",
    ]
    for triplet in expected:
        assert config.should_skip(triplet)
    assert config.should_skip("nbody:HHVM:default-php")
    assert not config.should_skip("nbody:MYVM:default-php")
Exemplo n.º 7
0
def test_skip0010():
    config = Config()
    config.SKIP = ["*:SomeVM:*",
                   "fasta:TruffleRuby:default-ruby",
                   "bench:*:*",
                   "bench:vm:skipvariant",
                   "*:*:skipvariant",
                   "*:*:*",  # everything should be skipped due to this
                   ]

    import uuid
    def rand_str():
        return uuid.uuid4().hex

    for i in xrange(25):
        key = "%s:%s:%s" % tuple([rand_str() for x in xrange(3)])
        assert config.should_skip(key)
Exemplo n.º 8
0
def test_skip0010():
    config = Config()
    config.SKIP = ["*:SomeVM:*",
                   "fasta:JRubyTruffle:default-ruby",
                   "bench:*:*",
                   "bench:vm:skipvariant",
                   "*:*:skipvariant",
                   "*:*:*",  # everything should be skipped due to this
                   ]

    import uuid
    def rand_str():
        return uuid.uuid4().hex

    for i in xrange(25):
        key = "%s:%s:%s" % tuple([rand_str() for x in xrange(3)])
        assert config.should_skip(key)
Exemplo n.º 9
0
def test_skip0009():
    config = Config()
    config.SKIP = ["*:SomeVM:*",
                   "fasta:TruffleRuby:default-ruby",
                   "bench:*:*",
                   "bench:vm:skipvariant",
                   "*:*:skipvariant",
                   ]

    assert config.should_skip("fasta:TruffleRuby:default-ruby")
    assert not config.should_skip("fasta:TruffleRuby:default-ruby2")
    assert config.should_skip("bench:lala:hihi")
    assert config.should_skip("bench:lala:hihi2")
    assert not config.should_skip("bench1:lala:hihi")
    assert config.should_skip("bench1:lala:skipvariant")
    assert config.should_skip("bench1:lala2:skipvariant")
Exemplo n.º 10
0
def test_skip0009():
    config = Config()
    config.SKIP = ["*:SomeVM:*",
                   "fasta:JRubyTruffle:default-ruby",
                   "bench:*:*",
                   "bench:vm:skipvariant",
                   "*:*:skipvariant",
                   ]

    assert config.should_skip("fasta:JRubyTruffle:default-ruby")
    assert not config.should_skip("fasta:JRubyTruffle:default-ruby2")
    assert config.should_skip("bench:lala:hihi")
    assert config.should_skip("bench:lala:hihi2")
    assert not config.should_skip("bench1:lala:hihi")
    assert config.should_skip("bench1:lala:skipvariant")
    assert config.should_skip("bench1:lala2:skipvariant")
Exemplo n.º 11
0
def test_skip0008():
    config = Config()
    config.SKIP = ["*:SomeVM:*", "fasta:TruffleRuby:default-ruby"]

    assert config.should_skip("fasta:TruffleRuby:default-ruby")
Exemplo n.º 12
0
def test_skip0008():
    config = Config()
    config.SKIP = ["*:SomeVM:*", "fasta:TruffleRuby:default-ruby"]

    assert config.should_skip("fasta:TruffleRuby:default-ruby")