Ejemplo n.º 1
0
def main(args):

    print("Simulator started\n")

    if 'HIVE_SIMULATOR' not in os.environ:
        print("Running in TEST-mode")
        return test()

    hivesim = os.environ['HIVE_SIMULATOR']
    print("Hive simulator: %s\n" % hivesim)
    hive = hivemodel.HiveAPI(hivesim)

    status = hivemodel.BlockTestExecutor(
        hive_api=hive,
        testfiles=utils.getFiles("./tests/BlockchainTests"),
        rules=Rules.RULES_FRONTIER).run()

    status = hivemodel.BlockTestExecutor(
        hive_api=hive,
        testfiles=utils.getFiles("./tests/BlockchainTests/EIP150"),
        rules=Rules.RULES_TANGERINE).run()

    status = hivemodel.BlockTestExecutor(
        hive_api=hive,
        testfiles=utils.getFiles("./tests/BlockchainTests/Homestead"),
        rules=Rules.RULES_HOMESTEAD).run()

    status = hivemodel.BlockTestExecutor(
        hive_api=hive,
        testfiles=utils.getFiles("./tests/BlockchainTests/TestNetwork"),
        rules=Rules.RULES_TRANSITIONNET).run()

    status = hivemodel.BlockTestExecutor(
        hive_api=hive,
        testfiles=utils.getFilesRecursive("./tests/BlockchainTests/GeneralStateTests/"),
        rules=None).run()

    if not status:
        sys.exit(-1)

    sys.exit(0)
Ejemplo n.º 2
0
def main(args):

    print("Simulator started\n")

    if 'HIVE_SIMULATOR' not in os.environ:
        print("Running in TEST-mode")
        return test()

    hivesim = os.environ['HIVE_SIMULATOR']
    print("Hive simulator: %s\n" % hivesim)
    hive = hivemodel.HiveAPI(hivesim)

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_FRONTIER))
    #        start=0, end=2)

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests/EIP150"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_TANGERINE))

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests/Homestead"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_HOMESTEAD))

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests/TestNetwork"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_TRANSITIONNET))

    status = hive.blockTests(testfiles=utils.getFilesRecursive(
        "./tests/BlockchainTests/GeneralStateTests/"),
                             executor=hivemodel.BlockTestExecutor(hive))
    #        whitelist=["mload32bitBound_return2_d0g0v0_EIP150"])

    if not status:
        sys.exit(-1)

    sys.exit(0)
Ejemplo n.º 3
0
def main(args):

    print("Simulator started\n")

    if 'HIVE_SIMULATOR' not in os.environ:
        print("Running in TEST-mode")
        return test()

    hivesim = os.environ['HIVE_SIMULATOR']
    print("Hive simulator: %s\n" % hivesim)
    hive = hivemodel.HiveAPI(hivesim)

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_FRONTIER))
    #        start=0, end=2, whitelist=["newChainFrom5Block"])

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests/EIP150"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_TANGERINE))

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests/Homestead"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_HOMESTEAD))

    status = hive.blockTests(
        testfiles=utils.getFiles("./tests/BlockchainTests/TestNetwork"),
        executor=hivemodel.BlockTestExecutor(hive, Rules.RULES_TRANSITIONNET),
        whitelist=["DaoTransactions_EmptyTransactionAndForkBlocksAhead"])

    status = hive.blockTests(testfiles=utils.getFilesRecursive(
        "./tests/BlockchainTests/GeneralStateTests/"),
                             executor=hivemodel.BlockTestExecutor(hive, None))

    if not status:
        sys.exit(-1)

    sys.exit(0)
Ejemplo n.º 4
0
def main(args):

    print("Simulator started\n")

    if 'HIVE_SIMULATOR' not in os.environ:
        print("Running in TEST-mode")
        return test()

    hivesim = os.environ['HIVE_SIMULATOR']
    print("Hive simulator: %s\n" % hivesim)
    hive = hivemodel.HiveAPI(hivesim)

    status = hivemodel.BlockTestExecutor(
        hive_api=hive,
        testfiles=utils.getFilesRecursive("./tests/BlockchainTests/")).run()

    if not status:
        sys.exit(-1)

    sys.exit(0)
Ejemplo n.º 5
0
def test():
    hive = HiveTestAPI()
    executor = hivemodel.BlockTestExecutor(hive, Rules.RULES_TANGERINE)
    hive.blockTests(testfiles=utils.getFiles("./tests/BlockchainTests"),
                    executor=executor)
Ejemplo n.º 6
0
def test():
    hive = HiveTestAPI()
    executor = hivemodel.BlockTestExecutor()
    hive.blockTests(testfiles=utils.getFiles("./tests/BlockchainTests"),
                    executor=executor)