#!/usr/bin/env python

from gradelib import *

r = Runner(save('jos.out'),
           stop_breakpoint('readline'))

@test(0, 'running OpenLSD')
def test_jos():
    r.run_qemu()

@test(10, 'Free pages', parent=test_jos)
def test_avail():
    r.match(r'\[LAB 1\] check_free_list_avail\(\) succeeded!')

@test(10, 'Order violations', parent=test_jos)
def test_order():
    r.match(r'\[LAB 1\] check_free_list_order\(\) succeeded!')

@test(10, 'Memory layout', parent=test_jos)
def test_memory_layout():
    r.match(r'\[LAB 1\] check_memory_layout\(\) succeeded!')

@test(10, 'Buddy consistency', parent=test_jos)
def test_memory_layout():
    r.match(r'\[LAB 1\] check_buddy_consistency\(\) succeeded!')

@test(10, 'Buddy split/merge', parent=test_jos)
def test_split_and_merge():
    r.match(r'\[LAB 1\] check_split_and_merge\(\) succeeded!')

run_tests()

