forked from iNeoxx/android_kernel_samsung_r9s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kunit
executable file
·34 lines (23 loc) · 811 Bytes
/
kunit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
import argparse
import sys
import subprocess
import os
root = os.path.abspath(os.path.dirname(__file__))
kunit_py = os.path.join(root, 'tools/testing/kunit/kunit.py')
def run(option):
return subprocess.check_call([kunit_py, 'run'])
def new(option):
print(option)
return 0
def main():
parser = argparse.ArgumentParser(prog='kunit')
subparsers = parser.add_subparsers(dest='subcommand', required=True, help='sub-command help')
parser_new = subparsers.add_parser('new', help='Add new template')
parser_new.set_defaults(func=new)
parser_run = subparsers.add_parser('run', help='run kunit with UML')
parser_run.set_defaults(func=run)
option = parser.parse_args()
return option.func(option)
if __name__ == "__main__":
sys.exit(main())