Skip to content
Snippets Groups Projects
Commit 2c30a014 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

remember all errors for ctest!

parent c2251a72
No related branches found
No related tags found
No related merge requests found
...@@ -14,3 +14,8 @@ set(BUILDNAME "${GMSH_OS}-${GMSH_PACKAGER}") ...@@ -14,3 +14,8 @@ set(BUILDNAME "${GMSH_OS}-${GMSH_PACKAGER}")
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "1000") set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "1000")
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "1000") set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "1000")
SET(CTEST_CUSTOM_ERROR_MATCH
${CTEST_CUSTOM_ERROR_MATCH}
"Error.*"
)
...@@ -59,6 +59,7 @@ int Msg::_progressMeterCurrent = 0; ...@@ -59,6 +59,7 @@ int Msg::_progressMeterCurrent = 0;
std::map<std::string, double> Msg::_timers; std::map<std::string, double> Msg::_timers;
int Msg::_warningCount = 0; int Msg::_warningCount = 0;
int Msg::_errorCount = 0; int Msg::_errorCount = 0;
int Msg::_atLeastOneErrorInRun = 0;
std::string Msg::_firstWarning; std::string Msg::_firstWarning;
std::string Msg::_firstError; std::string Msg::_firstError;
GmshMessage *Msg::_callback = 0; GmshMessage *Msg::_callback = 0;
...@@ -218,7 +219,7 @@ void Msg::Exit(int level) ...@@ -218,7 +219,7 @@ void Msg::Exit(int level)
MPI_Finalize(); MPI_Finalize();
#endif #endif
FinalizeOnelab(); FinalizeOnelab();
exit(_errorCount); exit(_atLeastOneErrorInRun);
} }
static int streamIsFile(FILE* stream) static int streamIsFile(FILE* stream)
...@@ -260,6 +261,7 @@ static int streamIsVT100(FILE* stream) ...@@ -260,6 +261,7 @@ static int streamIsVT100(FILE* stream)
void Msg::Fatal(const char *fmt, ...) void Msg::Fatal(const char *fmt, ...)
{ {
_errorCount++; _errorCount++;
_atLeastOneErrorInRun = 1;
char str[5000]; char str[5000];
va_list args; va_list args;
...@@ -307,6 +309,7 @@ void Msg::Fatal(const char *fmt, ...) ...@@ -307,6 +309,7 @@ void Msg::Fatal(const char *fmt, ...)
void Msg::Error(const char *fmt, ...) void Msg::Error(const char *fmt, ...)
{ {
_errorCount++; _errorCount++;
_atLeastOneErrorInRun = 1;
if(_verbosity < 1) return; if(_verbosity < 1) return;
......
...@@ -41,7 +41,7 @@ class Msg { ...@@ -41,7 +41,7 @@ class Msg {
// timers // timers
static std::map<std::string, double> _timers; static std::map<std::string, double> _timers;
// counters // counters
static int _warningCount, _errorCount; static int _warningCount, _errorCount, _atLeastOneErrorInRun;
static std::string _firstWarning, _firstError; static std::string _firstWarning, _firstError;
// callback // callback
static GmshMessage *_callback; static GmshMessage *_callback;
......
This diff is collapsed.
...@@ -4212,14 +4212,12 @@ Constraints : ...@@ -4212,14 +4212,12 @@ Constraints :
else{ else{
int j_master = (int)$8; int j_master = (int)$8;
int j_slave = (int)$3; int j_slave = (int)$3;
std::map<int,int> edgeCounterParts; std::map<int,int> edgeCounterParts;
for (int i = 0; i < List_Nbr($5); i++){ for (int i = 0; i < List_Nbr($5); i++){
double ds,dm; double ds,dm;
List_Read($5,i,&ds); List_Read($5,i,&ds);
List_Read($10,i,&dm); List_Read($10,i,&dm);
edgeCounterParts[(int) ds] = (int) dm; edgeCounterParts[(int) ds] = (int) dm;
std::cout << "edge " << ds << " to " << dm << std::endl;
} }
addPeriodicFace(j_slave,j_master,edgeCounterParts); addPeriodicFace(j_slave,j_master,edgeCounterParts);
} }
...@@ -5997,7 +5995,6 @@ void yymsg(int level, const char *fmt, ...) ...@@ -5997,7 +5995,6 @@ void yymsg(int level, const char *fmt, ...)
} }
} }
void addPeriodicFace(int iTarget,int iSource, void addPeriodicFace(int iTarget,int iSource,
const std::vector<double>& affineTransform) const std::vector<double>& affineTransform)
{ {
...@@ -6024,10 +6021,10 @@ void addPeriodicFace(int iTarget,int iSource, ...@@ -6024,10 +6021,10 @@ void addPeriodicFace(int iTarget,int iSource,
{ {
Surface *target = FindSurface(abs(iTarget)); Surface *target = FindSurface(abs(iTarget));
std::cout << "Encoding periodic connection between " << iTarget << " and " << iSource << std::endl; Msg::Info("Encoding periodic connection between %d and %d", iTarget, iSource);
std::map<int,int>::const_iterator sIter = edgeCounterparts.begin(); std::map<int,int>::const_iterator sIter = edgeCounterparts.begin();
for (;sIter!=edgeCounterparts.end();++sIter) { for (; sIter != edgeCounterparts.end(); ++sIter) {
std::cout << sIter->first << " - " << sIter->second << std::endl; Msg::Info("%d - %d", sIter->first, sIter->second);
} }
if (target) { if (target) {
...@@ -6040,8 +6037,9 @@ void addPeriodicFace(int iTarget,int iSource, ...@@ -6040,8 +6037,9 @@ void addPeriodicFace(int iTarget,int iSource,
else{ else{
GFace *target = GModel::current()->getFaceByTag(abs(iTarget)); GFace *target = GModel::current()->getFaceByTag(abs(iTarget));
GFace *source = GModel::current()->getFaceByTag(abs(iSource)); GFace *source = GModel::current()->getFaceByTag(abs(iSource));
if (!target || !source) Msg::Error("Could not find surface %d or %d for periodic copy", if (!target || !source)
iTarget,iSource); Msg::Error("Could not find surface %d or %d for periodic copy",
iTarget,iSource);
target->setMeshMaster(source,edgeCounterparts); target->setMeshMaster(source,edgeCounterparts);
} }
} }
...@@ -6059,8 +6057,9 @@ void addPeriodicEdge(int iTarget,int iSource, ...@@ -6059,8 +6057,9 @@ void addPeriodicEdge(int iTarget,int iSource,
else{ else{
GEdge *target = GModel::current()->getEdgeByTag(abs(iTarget)); GEdge *target = GModel::current()->getEdgeByTag(abs(iTarget));
GEdge *source = GModel::current()->getEdgeByTag(abs(iSource)); GEdge *source = GModel::current()->getEdgeByTag(abs(iSource));
if (!target || !source) Msg::Error("Could not find surface %d or %d for periodic copy", if (!target || !source)
iTarget,iSource); Msg::Error("Could not find surface %d or %d for periodic copy",
iTarget,iSource);
if (affineTransform.size() == 16) { if (affineTransform.size() == 16) {
target->setMeshMaster(source,affineTransform); target->setMeshMaster(source,affineTransform);
} }
...@@ -6070,10 +6069,8 @@ void addPeriodicEdge(int iTarget,int iSource, ...@@ -6070,10 +6069,8 @@ void addPeriodicEdge(int iTarget,int iSource,
} }
} }
void computeAffineTransformation(SPoint3& origin, void computeAffineTransformation(SPoint3& origin, SPoint3& axis,
SPoint3& axis, double angle, SPoint3& translation,
double angle,
SPoint3& translation,
std::vector<double>& tfo) std::vector<double>& tfo)
{ {
tfo.resize(16,0.0); tfo.resize(16,0.0);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
variables; new Physical specification with both label and numeric id; improved variables; new Physical specification with both label and numeric id; improved
visibility browser navigation; geometrical entities and post-processing views visibility browser navigation; geometrical entities and post-processing views
can now react to double-clicks, via new generic DoubleClicked options; images can now react to double-clicks, via new generic DoubleClicked options; images
can now be used as glyphs in post-processing views, using tex annotations with can now be used as glyphs in post-processing views, using text annotations with
the `file://' prefix; Views can be grouped and presented in subtrees; the `file://' prefix; Views can be grouped and organized in subtrees;
generalized periodic meshing constraints; code cleanups. generalized periodic meshing constraints; code cleanups.
2.9.3 (April 18, 2015): updated versions of PETSc/SLEPc and OpenCASCADE/OCE 2.9.3 (April 18, 2015): updated versions of PETSc/SLEPc and OpenCASCADE/OCE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment