Update autogen.py
This commit is contained in:
1 parent
27d70cb32c
commit
3f97fca40e
2 files changed
+19
-2
No files matched your search
+1
-1
@@ -18,6 +18,6 @@ script:
|
|||||||
- gcc --version
|
- gcc --version
|
||||||
- gcov --version
|
- gcov --version
|
||||||
- python --version
|
- python --version
|
||||||
- python autogen.py -e -b -cv -r -nf
|
- python autogen.py -e -b -cv -r -nf -nt
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
+18
-1
@@ -359,6 +359,13 @@ def run_codecov():
|
|||||||
'''
|
'''
|
||||||
execute_command([full_path(f'{BIN_DIR}/{CODECOV}.exe')])
|
execute_command([full_path(f'{BIN_DIR}/{CODECOV}.exe')])
|
||||||
execute_command(['gcov'] + GCOV_FLAGS + [f'{CODECOV}.gcda'])
|
execute_command(['gcov'] + GCOV_FLAGS + [f'{CODECOV}.gcda'])
|
||||||
|
execute_command(['rm', '*.h.gcov'])
|
||||||
|
|
||||||
|
|
||||||
|
def tidy():
|
||||||
|
'''
|
||||||
|
Places files to their respective directory.
|
||||||
|
'''
|
||||||
execute_command(['mv', '*.gcov', GCOV_DIR])
|
execute_command(['mv', '*.gcov', GCOV_DIR])
|
||||||
|
|
||||||
|
|
||||||
@@ -376,7 +383,7 @@ if __name__ == '__main__':
|
|||||||
expand = p.add_argument_group('expand', 'For dealing with code generation and formatting for tests')
|
expand = p.add_argument_group('expand', 'For dealing with code generation and formatting for tests')
|
||||||
|
|
||||||
task = p.add_argument_group('task', 'Specify a task (mutually exclusive)')
|
task = p.add_argument_group('task', 'Specify a task (mutually exclusive)')
|
||||||
task_ = task.add_mutually_exclusive_group(required=True)
|
task_ = task.add_mutually_exclusive_group()
|
||||||
|
|
||||||
action = p.add_argument_group('action', 'Actions on task')
|
action = p.add_argument_group('action', 'Actions on task')
|
||||||
|
|
||||||
@@ -414,6 +421,11 @@ if __name__ == '__main__':
|
|||||||
default=False,
|
default=False,
|
||||||
action='store_true',
|
action='store_true',
|
||||||
dest='noformat')
|
dest='noformat')
|
||||||
|
expand.add_argument('-nt', '--no-tidy',
|
||||||
|
help='Don\'t move files around',
|
||||||
|
default=False,
|
||||||
|
action='store_true',
|
||||||
|
dest='notidy')
|
||||||
|
|
||||||
action.add_argument('-b', '--build',
|
action.add_argument('-b', '--build',
|
||||||
help='Build task',
|
help='Build task',
|
||||||
@@ -439,6 +451,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
args = p.parse_args()
|
args = p.parse_args()
|
||||||
|
|
||||||
|
has_target = args.main or args.codecov or args.single
|
||||||
|
|
||||||
if args.config:
|
if args.config:
|
||||||
print(CONFIG)
|
print(CONFIG)
|
||||||
exit(0)
|
exit(0)
|
||||||
@@ -490,3 +504,6 @@ if __name__ == '__main__':
|
|||||||
elif args.single:
|
elif args.single:
|
||||||
require_file(f'{OUTPUT_DIR}/{SINGLE}.c')
|
require_file(f'{OUTPUT_DIR}/{SINGLE}.c')
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
if not args.notidy and has_target:
|
||||||
|
tidy()
|
||||||
Reference in new issue
Block a user