Skip to content

Commit e78f881

Browse files
committed
Unit tests
1 parent a029863 commit e78f881

File tree

9 files changed

+1337
-5
lines changed

9 files changed

+1337
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ if(RUN_TESTS)
140140

141141
# -- Commander Object --
142142
add_executable( test_commander_init ${SOURCES} ${UNIT_TESTING} extras/tests/testCases/Commander/test_init.cpp )
143+
add_executable( test_commander_execute ${SOURCES} ${UNIT_TESTING} extras/tests/testCases/Commander/test_execute.cpp )
144+
add_executable( test_commander_piping ${SOURCES} ${UNIT_TESTING} extras/tests/testCases/Commander/test_piping.cpp )
145+
add_executable( test_commander_helper_functions ${SOURCES} ${UNIT_TESTING} extras/tests/testCases/Commander/test_helper_functions.cpp )
143146

144147
endif()
145148

build.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@
399399
if os.path.isdir( rootDirectory + "/" + buildDirectoryName + "/report" ) == False:
400400
os.mkdir( rootDirectory + "/" + buildDirectoryName + "/report" )
401401

402-
shutil.copyfile( rootDirectory + "/docs/Style/gcovr/style.css", rootDirectory + "/" + buildDirectoryName + "/style.css" )
402+
shutil.copyfile( rootDirectory + "/extras/gcovr/style.css", rootDirectory + "/" + buildDirectoryName + "/style.css" )
403403

404404
# Run gcovr to evaluate coverage
405405
command = "gcovr -r .. --html-details --html-css style.css -o report/report.html"
@@ -441,6 +441,11 @@
441441
cssFile.writelines(styleLines)
442442
cssFile.close()
443443

444+
# Check if the docs directory exists.
445+
# If not, create it.
446+
if os.path.isdir( rootDirectory + "/docs/" ) == False:
447+
os.mkdir( rootDirectory + "/docs/" )
448+
444449
# Check if the html directory exists.
445450
# If not, create it.
446451
if os.path.isdir( rootDirectory + "/docs/html/" ) == False:
@@ -473,6 +478,11 @@
473478

474479
coverageBadge = anybadge.Badge( label="Coverage", value=badgeValue, default_color=badgeColor )
475480

481+
# Check if the images directory exists.
482+
# If not, create it.
483+
if os.path.isdir( rootDirectory + "/docs/images/" ) == False:
484+
os.mkdir( rootDirectory + "/docs/images/" )
485+
476486
if os.path.exists( rootDirectory + "/docs/images/coverage_badge.svg" ):
477487
os.remove( rootDirectory + "/docs/images/coverage_badge.svg" )
478488

0 commit comments

Comments
 (0)