-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* create linux runner * better order * Update and rename libmem-linux.yml to libmem-linux-x86.yml * Create test.sh * Update libmem-linux-x86.yml * Update libmem-linux-x86.yml * archive artifacts after test coverage report * build tests * Update test.sh * Update test.sh * Update test.sh * Update test.sh * Update libmem-linux-x86.yml * Update and rename libmem-linux-x86.yml to libmem-linux-x86-tester.yml * Rename test.sh to unit_test.sh * Update unit_test.sh * Update libmem-linux-x86-tester.yml * Update libmem-linux-x86-tester.yml * Update unit_test.sh * Update unit_test.sh * arrange for tests * Update CMakeLists.txt * removed option that breaks MSVC builds * Update CMakeLists.txt * Update libmem-linux-x86-tester.yml * Update libmem-linux-x86-tester.yml * Update CMakeLists.txt * Update CMakeLists.txt * Update unit_test.sh * Update unit_test.sh * Update unit_test.sh * Update and rename libmem-linux-x86-tester.yml to test-linux.yml * Update unit_test.sh * Update unit_test.sh * Update unit_test.sh * Update unit_test.sh * run target executable --------- Co-authored-by: Rdbo <[email protected]>
- Loading branch information
1 parent
2415894
commit 902197a
Showing
3 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
error=0 | ||
tests=$(find build/tests -type f -executable -name "unit*") | ||
|
||
for test in $tests; do | ||
target=$(find build/tests -type f -executable -name "target*") | ||
echo "Running $target" | ||
./$target & | ||
|
||
echo "Running $test" | ||
$test | ||
if [ $? -ne 0 ]; then | ||
error=$((error + $?)) | ||
fi | ||
|
||
pkill -f "$target" | ||
done | ||
|
||
mkdir -p build/coverage | ||
|
||
gcda_files=$(find src -name "*.gcda") | ||
|
||
for gcda_file in $gcda_files; do | ||
echo "Processing gcov for $gcda_file" | ||
gcov "$gcda_file" | ||
done | ||
|
||
gcovr -r . --html --html-details -o build/coverage/index.html | ||
|
||
exit $error |