Example #1
0
def _watch_for_files(options):
    _record_pid()

    args, _ = run_cli.get_cli_args(['all'])
    donefile = posixpath.join(settings.test_folder, '.done')

    print("Waiting for new tests. PID: " + str(os.getpid()))

    while True:
        if os.path.isfile(donefile):
            os.remove(donefile)

            print("Found new tests.\n", "=" * 80, sep="\n")

            harness, test_set = run.load_and_run(args, test_class=WatchTest)
            if len(test_set) > 0:
                run.display_results(harness)

            _delete_assembly()

            print("")
            print("=" * 80, "Done.\n", sep="\n")
            print("Waiting for new tests. PID: " + str(os.getpid()))

        time.sleep(settings.check_interval)
Example #2
0
def _watch_for_files(options):
    _record_pid()

    args, _ = run_cli.get_cli_args(['all'])
    donefile = posixpath.join(settings.test_folder, '.done')

    print("Waiting for new tests. PID: " + str(os.getpid()))

    while True:
        if os.path.isfile(donefile):
            os.remove(donefile)

            print("Found new tests.\n", "=" * 80, sep="\n")

            harness, test_set = run.load_and_run(args, test_class=WatchTest)
            if len(test_set) > 0:
                run.display_results(harness)

            _delete_assembly()

            print("")
            print("=" * 80, "Done.\n", sep="\n")
            print("Waiting for new tests. PID: " + str(os.getpid()))

        time.sleep(settings.check_interval)
Example #3
0
def main(argv):
    print("\nRunning your compiler to generate assembly files.")
    print("=" * 80, end='\n\n')

    args, _ = run_cli.get_cli_args(argv)
    _, test_set = run.load_and_run(args,
                                   harness=AssemblyGenerator(),
                                   test_class=AssemblyWritingTest,
                                   message="Compiling {which_tests}:")

    if len(test_set) > 0 and args.save_as is not None:
        run.save_suite(args.save_as, test_set, overwrite=args.overwrite)

    print("")
    print("=" * 80)
    print("Done.")
Example #4
0
def main(argv):
    print("\nRunning your compiler to generate assembly files.")
    print("=" * 80, end='\n\n')

    args, _ = run_cli.get_cli_args(argv)
    _, test_set = run.load_and_run(
        args,
        harness=AssemblyGenerator(),
        test_class=AssemblyWritingTest,
        message="Compiling {which_tests}:")

    if len(test_set) > 0 and args.save_as is not None:
        run.save_suite(args.save_as, test_set, overwrite=args.overwrite)

    print("")
    print("=" * 80)
    print("Done.")