#!/usr/bin/env python

import re
from gradelib import *

r = Runner(save("xv6.out"))

@test(40, "running bigfile")
def test_bigfile():
    r.run_qemu(shell_script([
        'bigfile'
    ]), timeout=180)
    r.match('^wrote 65803 blocks$')
    r.match('^bigfile done; ok$')

@test(10, "usertests")
def test_usertests():
    r.run_qemu(shell_script([
        'usertests'
    ]), timeout=300)
    r.match('^ALL TESTS PASSED$')

run_tests()
