1 ##########################################################################
2 # Copyright (c) 2009 - 2016, ETH Zurich.
5 # This file is distributed under the terms in the attached LICENSE file.
6 # If you do not find this file, copies can be found by writing to:
7 # ETH Zurich D-INFK, Universitaetstr. 6, CH-8092 Zurich. Attn: Systems Group.
8 ##########################################################################
11 from common import TestCommon
12 from results import PassFailResult, PassFailMultiResult
15 class NkmTest(TestCommon):
16 '''memory kernel interface tests'''
19 def get_modules(self, build, machine):
20 modules = super(NkmTest, self).get_modules(build, machine)
21 modules.add_module("nkmtest_all")
24 def get_finish_string(self):
25 return "nkmtest_all: all tests passed"
27 def process_data(self, testdir, rawiter):
28 # the test passed iff the last line is the finish string
32 passed = lastline.startswith(self.get_finish_string())
33 return PassFailResult(passed)
36 class NkmTestMapOffset(TestCommon):
37 '''test that kernel map interface does check source frame size'''
38 name = "nkmtest_map_offset"
40 def get_modules(self, build, machine):
41 modules = super(NkmTestMapOffset, self).get_modules(build, machine)
42 modules.add_module("nkmtest_map_offset")
45 def get_finish_string(self):
46 return "nkmtest_map_offset: "
48 def process_data(self, testdir, rawiter):
49 # the test passed iff the last line is the finish string
52 if line.startswith("nkmtest_map_offset: FAILURE"):
54 return PassFailMultiResult(self.name, errors)