Merge pull request 'update unittest helper scripts' (#525) from eive/fsfw:mueller/update-scripts into development
Reviewed-on: fsfw/fsfw#525
This commit is contained in:
commit
8c17c7e1a7
@ -6,6 +6,7 @@ import platform
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import argparse
|
import argparse
|
||||||
|
import webbrowser
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
@ -18,6 +19,10 @@ information how to set up the build folder.
|
|||||||
def main():
|
def main():
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Processing arguments for LCOV helper script.")
|
parser = argparse.ArgumentParser(description="Processing arguments for LCOV helper script.")
|
||||||
|
parser.add_argument(
|
||||||
|
'-o', '--open', action='store_true', help='Open coverage data in webbrowser'
|
||||||
|
)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
build_dir_list = []
|
build_dir_list = []
|
||||||
if not os.path.isfile('README.md'):
|
if not os.path.isfile('README.md'):
|
||||||
@ -41,6 +46,8 @@ def main():
|
|||||||
print("Multiple build directories found!")
|
print("Multiple build directories found!")
|
||||||
build_directory = determine_build_dir(build_dir_list)
|
build_directory = determine_build_dir(build_dir_list)
|
||||||
perform_lcov_operation(build_directory)
|
perform_lcov_operation(build_directory)
|
||||||
|
if os.path.isdir('fsfw-tests_coverage') and args.open:
|
||||||
|
webbrowser.open('fsfw-tests_coverage/index.html')
|
||||||
|
|
||||||
|
|
||||||
def check_for_cmake_build_dir(build_dir_dict: list):
|
def check_for_cmake_build_dir(build_dir_dict: list):
|
||||||
|
3
scripts/gen-unittest.sh
Executable file
3
scripts/gen-unittest.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
mkdir build-Unittest && cd build-Unittest
|
||||||
|
cmake -DFSFW_BUILD_UNITTESTS=ON -DFSFW_OSAL=host -DCMAKE_BUILD_TYPE=Debug ..
|
Loading…
Reference in New Issue
Block a user