approvals / ApprovalTests.cpp

Native ApprovalTests for C++ on Linux, Mac and Windows
https://approvaltestscpp.readthedocs.io/en/latest/
Apache License 2.0
317 stars 51 forks source link

CppUTest's CMakeList.txt appears to cause Boost tests to fail in Github Actions Mac builds #160

Closed claremacrae closed 3 years ago

claremacrae commented 3 years ago

For an example, see https://github.com/approvals/ApprovalTests.cpp/actions/runs/306465006

_Originally posted by @claremacrae in https://github.com/approvals/ApprovalTests.cpp/issue_comments/706770945_

claremacrae commented 3 years ago

I turned on verbose builds, on both master and CppUTest_support branches, and downloaded the fill logs from Github Actions builds...

Adding cpputest makes the following changes to the builds:

cmake step

Adds this output:

2020-10-14T13:49:27.4770160Z -- Build files have been written to: /Users/runner/work/ApprovalTests.cpp/ApprovalTests.cpp/build_space/CMake/cpputest/cpputest-download
2020-10-14T13:49:27.5281100Z Scanning dependencies of target cpputest
2020-10-14T13:49:27.5431290Z [ 11%] Creating directories for 'cpputest'
2020-10-14T13:49:27.6037000Z [ 22%] Performing download step (git clone) for 'cpputest'
2020-10-14T13:49:27.6270630Z Cloning into 'cpputest-src'...
2020-10-14T13:49:31.5947070Z HEAD is now at 67d2dfd4 Merge pull request #1403 from basvodde/master
2020-10-14T13:49:31.7358570Z [ 33%] Performing update step for 'cpputest'
2020-10-14T13:49:31.7831900Z [ 44%] No patch step for 'cpputest'
2020-10-14T13:49:31.8127240Z [ 55%] No configure step for 'cpputest'
2020-10-14T13:49:31.8503430Z [ 66%] No build step for 'cpputest'
2020-10-14T13:49:31.8884850Z [ 77%] No install step for 'cpputest'
2020-10-14T13:49:31.9263130Z [ 88%] No test step for 'cpputest'
2020-10-14T13:49:31.9632520Z [100%] Completed 'cpputest'
2020-10-14T13:49:32.0643020Z [100%] Built target cpputest
2020-10-14T13:49:32.0825440Z -- Looking for fork
2020-10-14T13:49:32.4011200Z -- Looking for fork - found
2020-10-14T13:49:32.4066280Z -- Looking for gettimeofday
2020-10-14T13:49:32.7094490Z -- Looking for gettimeofday - found
2020-10-14T13:49:32.7156570Z -- Looking for pthread_mutex_lock
2020-10-14T13:49:33.0189920Z -- Looking for pthread_mutex_lock - found
2020-10-14T13:49:33.0248000Z -- Looking for strdup
2020-10-14T13:49:33.3429030Z -- Looking for strdup - found
2020-10-14T13:49:33.4023570Z -- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
2020-10-14T13:49:33.4560340Z -- Performing Test WARNING_C_FLAG_Weverything
2020-10-14T13:49:33.7661660Z -- Performing Test WARNING_C_FLAG_Weverything - Success
2020-10-14T13:49:33.7845100Z -- Performing Test WARNING_C_FLAG_Wall
2020-10-14T13:49:34.0992730Z -- Performing Test WARNING_C_FLAG_Wall - Success
2020-10-14T13:49:34.1126200Z -- Performing Test WARNING_C_FLAG_Wextra
2020-10-14T13:49:34.4522110Z -- Performing Test WARNING_C_FLAG_Wextra - Success
2020-10-14T13:49:34.4724130Z -- Performing Test WARNING_C_FLAG_pedantic
2020-10-14T13:49:34.8458790Z -- Performing Test WARNING_C_FLAG_pedantic - Success
2020-10-14T13:49:34.8593310Z -- Performing Test WARNING_C_FLAG_Wshadow
2020-10-14T13:49:35.1008370Z -- Performing Test WARNING_C_FLAG_Wshadow - Success
2020-10-14T13:49:35.1139090Z -- Performing Test WARNING_C_FLAG_Wswitch-default
2020-10-14T13:49:35.3557400Z -- Performing Test WARNING_C_FLAG_Wswitch-default - Success
2020-10-14T13:49:35.3818410Z -- Performing Test WARNING_C_FLAG_Wswitch-enum
2020-10-14T13:49:35.7209380Z -- Performing Test WARNING_C_FLAG_Wswitch-enum - Success
2020-10-14T13:49:35.7288390Z -- Performing Test WARNING_C_FLAG_Wconversion
2020-10-14T13:49:35.9415110Z -- Performing Test WARNING_C_FLAG_Wconversion - Success
2020-10-14T13:49:35.9593840Z -- Performing Test WARNING_C_FLAG_Wsign-conversion
2020-10-14T13:49:36.1446140Z -- Performing Test WARNING_C_FLAG_Wsign-conversion - Success
2020-10-14T13:49:36.1628600Z -- Performing Test WARNING_C_FLAG_Wno-padded
2020-10-14T13:49:36.3934040Z -- Performing Test WARNING_C_FLAG_Wno-padded - Success
2020-10-14T13:49:36.4062980Z -- Performing Test WARNING_C_FLAG_Wno-disabled-macro-expansion
2020-10-14T13:49:37.4896320Z -- Performing Test WARNING_C_FLAG_Wno-disabled-macro-expansion - Success
2020-10-14T13:49:37.4940290Z -- Performing Test WARNING_C_FLAG_Wno-reserved-id-macro
2020-10-14T13:49:37.8726420Z -- Performing Test WARNING_C_FLAG_Wno-reserved-id-macro - Success
2020-10-14T13:49:37.8759590Z -- Performing Test WARNING_C_FLAG_Wno-keyword-macro
2020-10-14T13:49:38.3506690Z -- Performing Test WARNING_C_FLAG_Wno-keyword-macro - Success
2020-10-14T13:49:38.3573300Z -- Performing Test WARNING_C_FLAG_Wno-long-long
2020-10-14T13:49:38.7063870Z -- Performing Test WARNING_C_FLAG_Wno-long-long - Success
2020-10-14T13:49:38.7085670Z -- Performing Test WARNING_C_FLAG_Wstrict-prototypes
2020-10-14T13:49:39.0489720Z -- Performing Test WARNING_C_FLAG_Wstrict-prototypes - Success
2020-10-14T13:49:39.0691250Z -- Performing Test WARNING_CXX_FLAG_Weverything
2020-10-14T13:49:39.3682330Z -- Performing Test WARNING_CXX_FLAG_Weverything - Success
2020-10-14T13:49:39.3699250Z -- Performing Test WARNING_CXX_FLAG_Wall
2020-10-14T13:49:39.6057740Z -- Performing Test WARNING_CXX_FLAG_Wall - Success
2020-10-14T13:49:39.6135060Z -- Performing Test WARNING_CXX_FLAG_Wextra
2020-10-14T13:49:39.8639700Z -- Performing Test WARNING_CXX_FLAG_Wextra - Success
2020-10-14T13:49:39.8659560Z -- Performing Test WARNING_CXX_FLAG_pedantic
2020-10-14T13:49:40.1407930Z -- Performing Test WARNING_CXX_FLAG_pedantic - Success
2020-10-14T13:49:40.1442210Z -- Performing Test WARNING_CXX_FLAG_Wshadow
2020-10-14T13:49:40.3780580Z -- Performing Test WARNING_CXX_FLAG_Wshadow - Success
2020-10-14T13:49:40.3960400Z -- Performing Test WARNING_CXX_FLAG_Wswitch-default
2020-10-14T13:49:40.6009180Z -- Performing Test WARNING_CXX_FLAG_Wswitch-default - Success
2020-10-14T13:49:40.6196860Z -- Performing Test WARNING_CXX_FLAG_Wswitch-enum
2020-10-14T13:49:40.8283390Z -- Performing Test WARNING_CXX_FLAG_Wswitch-enum - Success
2020-10-14T13:49:40.8405640Z -- Performing Test WARNING_CXX_FLAG_Wconversion
2020-10-14T13:49:41.0708010Z -- Performing Test WARNING_CXX_FLAG_Wconversion - Success
2020-10-14T13:49:41.0727660Z -- Performing Test WARNING_CXX_FLAG_Wsign-conversion
2020-10-14T13:49:41.2673560Z -- Performing Test WARNING_CXX_FLAG_Wsign-conversion - Success
2020-10-14T13:49:41.2690480Z -- Performing Test WARNING_CXX_FLAG_Wno-padded
2020-10-14T13:49:41.4644220Z -- Performing Test WARNING_CXX_FLAG_Wno-padded - Success
2020-10-14T13:49:41.4667790Z -- Performing Test WARNING_CXX_FLAG_Wno-disabled-macro-expansion
2020-10-14T13:49:41.6954690Z -- Performing Test WARNING_CXX_FLAG_Wno-disabled-macro-expansion - Success
2020-10-14T13:49:41.7147050Z -- Performing Test WARNING_CXX_FLAG_Wno-reserved-id-macro
2020-10-14T13:49:41.9029650Z -- Performing Test WARNING_CXX_FLAG_Wno-reserved-id-macro - Success
2020-10-14T13:49:41.9138920Z -- Performing Test WARNING_CXX_FLAG_Wno-keyword-macro
2020-10-14T13:49:42.1153700Z -- Performing Test WARNING_CXX_FLAG_Wno-keyword-macro - Success
2020-10-14T13:49:42.1174290Z -- Performing Test WARNING_CXX_FLAG_Wno-long-long
2020-10-14T13:49:42.3434680Z -- Performing Test WARNING_CXX_FLAG_Wno-long-long - Success
2020-10-14T13:49:42.3455300Z -- Performing Test WARNING_CXX_FLAG_Woverloaded-virtual
2020-10-14T13:49:42.5418290Z -- Performing Test WARNING_CXX_FLAG_Woverloaded-virtual - Success
2020-10-14T13:49:42.5489550Z -- Performing Test WARNING_CXX_FLAG_Wno-global-constructors
2020-10-14T13:49:42.7617530Z -- Performing Test WARNING_CXX_FLAG_Wno-global-constructors - Success
2020-10-14T13:49:42.7634230Z -- Performing Test WARNING_CXX_FLAG_Wno-exit-time-destructors
2020-10-14T13:49:42.9590090Z -- Performing Test WARNING_CXX_FLAG_Wno-exit-time-destructors - Success
2020-10-14T13:49:42.9734810Z -- Performing Test WARNING_CXX_FLAG_Wno-weak-vtables
2020-10-14T13:49:43.1912070Z -- Performing Test WARNING_CXX_FLAG_Wno-weak-vtables - Success
2020-10-14T13:49:43.1929260Z -- Performing Test WARNING_CXX_FLAG_Wno-old-style-cast
2020-10-14T13:49:43.3577180Z -- Performing Test WARNING_CXX_FLAG_Wno-old-style-cast - Success
2020-10-14T13:49:43.4821230Z 
2020-10-14T13:49:43.4822970Z -------------------------------------------------------
2020-10-14T13:49:43.4823380Z CppUTest Version 4.0
2020-10-14T13:49:43.4823580Z 
2020-10-14T13:49:43.4823850Z Current compiler options:
2020-10-14T13:49:43.4825030Z     CC:                                 /Applications/Xcode_11.7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
2020-10-14T13:49:43.4826030Z     CXX:                                /Applications/Xcode_11.7.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
2020-10-14T13:49:43.4829080Z     CppUTest CFLAGS:                     -include "/Users/runner/work/ApprovalTests.cpp/ApprovalTests.cpp/build_space/CMake/cpputest/cpputest-src/include/CppUTest/MemoryLeakDetectorMallocMacros.h"  -Weverything -Wall -Wextra -pedantic -Wshadow -Wswitch-default -Wswitch-enum -Wconversion -Wsign-conversion -Wno-padded -Wno-disabled-macro-expansion -Wno-reserved-id-macro -Wno-keyword-macro -Wno-long-long -Wstrict-prototypes
2020-10-14T13:49:43.4835720Z     CppUTest CXXFLAGS:                   -include "/Users/runner/work/ApprovalTests.cpp/ApprovalTests.cpp/build_space/CMake/cpputest/cpputest-src/include/CppUTest/MemoryLeakDetectorNewMacros.h" -include "/Users/runner/work/ApprovalTests.cpp/ApprovalTests.cpp/build_space/CMake/cpputest/cpputest-src/include/CppUTest/MemoryLeakDetectorMallocMacros.h"  -Weverything -Wall -Wextra -pedantic -Wshadow -Wswitch-default -Wswitch-enum -Wconversion -Wsign-conversion -Wno-padded -Wno-disabled-macro-expansion -Wno-reserved-id-macro -Wno-keyword-macro -Wno-long-long -Woverloaded-virtual -Wno-global-constructors -Wno-exit-time-destructors -Wno-weak-vtables -Wno-old-style-cast
2020-10-14T13:49:43.4838960Z     CppUTest LDFLAGS:                   
2020-10-14T13:49:43.4839210Z 
2020-10-14T13:49:43.4839540Z Features configured in CppUTest:
2020-10-14T13:49:43.4840380Z     Memory Leak Detection:              ON
2020-10-14T13:49:43.4840740Z     Compiling Extensions:               ON
2020-10-14T13:49:43.4841080Z     Support Long Long:                  OFF
2020-10-14T13:49:43.4841400Z     Use CppUTest flags:                 ON
2020-10-14T13:49:43.4841590Z 
2020-10-14T13:49:43.4841860Z     Using Standard C library:           ON
2020-10-14T13:49:43.4842210Z     Using Standard C++ library:         ON
2020-10-14T13:49:43.4842550Z     Using C++11 library:                OFF
2020-10-14T13:49:43.4843000Z 
2020-10-14T13:49:43.4843320Z     Generating map file:                OFF
2020-10-14T13:49:43.4843670Z     Compiling with coverage:            OFF
2020-10-14T13:49:43.4843890Z 
2020-10-14T13:49:43.4844970Z     Compile and run self-tests          OFF
2020-10-14T13:49:43.4845750Z     Run self-tests separately           OFF
2020-10-14T13:49:43.4846080Z 
2020-10-14T13:49:43.4847250Z -------------------------------------------------------
2020-10-14T13:49:43.4847500Z 
2020-10-14T13:49:43.6556960Z -- Configuring done
2020-10-14T13:49:43.6854430Z -- Generating done

Makes this change:

- 2020-10-14T13:47:49.7537260Z -- Build type: 
+ 2020-10-14T13:49:50.0801610Z -- Build type: RelWithDebInfo

build

Adds -O2 -g -DNDEBUG to the command-line args

claremacrae commented 3 years ago

This was fixed in 3bb468c5180282863996850cdf41d960b01b9b0b - by forcing cmake on Mac and linux to generate a Debug build, preventing CppUTest's CMake from setting it to RelWithDebInfo.