mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
preparing test_user_mode, need to generalize stuff as usual
This commit is contained in:
25
example_properties.py
Normal file
25
example_properties.py
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
class ExampleProperties:
|
||||
'''
|
||||
Encodes properties of userland and baremetal examples.
|
||||
For directories, it applies to all files under the directory.
|
||||
Used to determine how to build and test the examples.
|
||||
'''
|
||||
def __init__(
|
||||
exit_status=0,
|
||||
interactive=False,
|
||||
more_than_1s=False,
|
||||
):
|
||||
self.exit_status = exit_status
|
||||
self.interactive = interactive
|
||||
self.more_than_1s = more_than_1s
|
||||
|
||||
def should_be_tested(self):
|
||||
return \
|
||||
not self.interactive and \
|
||||
not self.more_than_1s
|
||||
|
||||
executable_properties = {
|
||||
'userland/arch/x86_64/c/ring0.c': ExecutableProperties(exits_nonzero=True),
|
||||
}
|
||||
Reference in New Issue
Block a user