Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
fa056594
Commit
fa056594
authored
7 years ago
by
Stéphane Del Pino
Committed by
Stéphane Del Pino
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixes git revision test (when no git is installed)
parent
e73c51aa
No related branches found
No related tags found
1 merge request
!4
Cicd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/CMakeLists.txt
+8
-5
8 additions, 5 deletions
tests/CMakeLists.txt
tests/test_RevisionInfo.cpp
+8
-1
8 additions, 1 deletion
tests/test_RevisionInfo.cpp
with
16 additions
and
6 deletions
tests/CMakeLists.txt
+
8
−
5
View file @
fa056594
include_directories
(
"
${
CATCH_INCLUDE_PATH
}
"
)
include_directories
(
"
${
CATCH_INCLUDE_PATH
}
"
)
include_directories
(
"
${
PASTIS_BINARY_DIR
}
/src/utils"
)
set
(
EXECUTABLE_OUTPUT_PATH
${
PASTIS_BINARY_DIR
}
)
set
(
EXECUTABLE_OUTPUT_PATH
${
PASTIS_BINARY_DIR
}
)
add_executable
(
unit_tests
add_executable
(
unit_tests
test_main.cpp
test_main.cpp
test_RevisionInfo.cpp
test_RevisionInfo.cpp
test_TinyVector.cpp
)
test_TinyVector.cpp
)
target_include_directories
(
Catch INTERFACE
${
CATCH_INCLUDE_DIR
}
)
target_include_directories
(
Catch INTERFACE
${
CATCH_INCLUDE_DIR
}
)
target_link_libraries
(
unit_tests
target_link_libraries
(
unit_tests
PastisUtils
PastisUtils
Catch
)
Catch
)
enable_testing
()
enable_testing
()
...
...
This diff is collapsed.
Click to expand it.
tests/test_RevisionInfo.cpp
+
8
−
1
View file @
fa056594
...
@@ -2,6 +2,13 @@
...
@@ -2,6 +2,13 @@
#include
<RevisionInfo.hpp>
#include
<RevisionInfo.hpp>
#include
<pastis_git_revision.hpp>
TEST_CASE
(
"RevisionInfo"
,
"[utils]"
)
{
TEST_CASE
(
"RevisionInfo"
,
"[utils]"
)
{
REQUIRE
(
RevisionInfo
::
hasGitInfo
()
==
true
);
#ifdef HAS_PASTIS_GIT_INFO
#define HAS_GIT_INFO true
#else
#define HAS_GIT_INFO false
#endif
REQUIRE
(
(
RevisionInfo
::
hasGitInfo
()
==
HAS_GIT_INFO
)
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment