Skip to content

Commit c508459

Browse files
authored
Merge pull request #2582 from opensim-org/ignore_timing_testC3D_appveyor
Introduce symbol SKIP_TIMING to control timing section of testC3DFileAdapter
2 parents b683578 + 19c84a8 commit c508459

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

OpenSim/Common/Test/testC3DFileAdapter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ void test(const std::string filename) {
170170
loadTime = 1.e3*(std::clock() - t0) / CLOCKS_PER_SEC;
171171
cout << "\tC3DFileAdapter '" << filename << "' read with forces at COP in "
172172
<< loadTime << "ms" << endl;
173-
174-
#ifdef NDEBUG
173+
// on ci-biulds will define SKIP_TIMING as it is unpredictably slow on some machines
174+
#if defined(NDEBUG) && !defined(SKIP_TIMING)
175175
ASSERT(loadTime < MaximumLoadTimeInMS, __FILE__, __LINE__,
176176
"Unable to load '" + filename + "' within " +
177177
to_string(MaximumLoadTimeInMS) + "ms.");

appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ build_script:
103103
- cd %OPENSIM_BUILD_DIR%
104104
# Configure. # TODO -DBUILD_SIMM_TRANSLATOR=ON
105105
# Set the CXXFLAGS environment variable to turn warnings into errors.
106-
- cmake -E env CXXFLAGS="/WX" cmake %OPENSIM_SOURCE_DIR% -G"%CMAKE_GENERATOR%" -T"%CMAKE_TOOLSET%" -DSIMBODY_HOME=C:\simbody%NUGET_PACKAGE_ID_SUFFIX% -DOPENSIM_DEPENDENCIES_DIR=%OPENSIM_DEPENDENCIES_INSTALL_DIR% -DCMAKE_INSTALL_PREFIX=%OPENSIM_INSTALL_DIR% -DBUILD_JAVA_WRAPPING=ON -DBUILD_PYTHON_WRAPPING=ON -DWITH_BTK:BOOL=ON
106+
# Skip timing test section included by default
107+
- cmake -E env CXXFLAGS="/WX -DSKIP_TIMING" cmake %OPENSIM_SOURCE_DIR% -G"%CMAKE_GENERATOR%" -T"%CMAKE_TOOLSET%" -DSIMBODY_HOME=C:\simbody%NUGET_PACKAGE_ID_SUFFIX% -DOPENSIM_DEPENDENCIES_DIR=%OPENSIM_DEPENDENCIES_INSTALL_DIR% -DCMAKE_INSTALL_PREFIX=%OPENSIM_INSTALL_DIR% -DBUILD_JAVA_WRAPPING=ON -DBUILD_PYTHON_WRAPPING=ON -DWITH_BTK:BOOL=ON
107108

108109
# Build.
109110
- cmake --build . --config Release -- /maxcpucount:4 /verbosity:quiet #/p:TreatWarningsAsErrors="true"

0 commit comments

Comments
 (0)