facebook / wdt

Warp speed Data Transfer (WDT) is an embeddedable library (and command line tool) aiming to transfer data between 2 systems as fast as possible over multiple TCP paths.
https://www.facebook.com/WdtOpenSource
Other
2.86k stars 392 forks source link

macOS tests do not run from Xcode #189

Open hjmallon opened 5 years ago

hjmallon commented 5 years ago

Using bc22626deede683d11a2668121ebbd2d0389a7b8 with my change to fix gtest https://github.com/facebook/wdt/pull/188

On macOS 10.14 Xcode 10.2 with Makefiles all tests pass. On macOS 10.14 Xcode 10.2 using Xcode many fail.

On macOS 10.14 Xcode 10.2 using Xcode

/usr/local/Cellar/cmake/3.14.3/bin/ctest --force-new-ctest-process -C Debug                                                                                                        
Test project /Users/harrym/Development/wdt/wdt-mac                                                                                                                                 
      Start  1: AllTestsInGenTest                                                                                                                                                  
 1/24 Test  #1: AllTestsInGenTest ................***Failed    0.01 sec                                                                                                            
      Start  2: AllTestsInProtocolTest                                                                                                                                             
 2/24 Test  #2: AllTestsInProtocolTest ...........   Passed    0.01 sec                                                                                                            
      Start  3: test_encdeci64_func                                                                                                                                                
 3/24 Test  #3: test_encdeci64_func ..............   Passed    1.37 sec                                                                                                            
      Start  4: test_stats                                                                                                                                                         
 4/24 Test  #4: test_stats .......................   Passed    0.01 sec                                                                                                            
      Start  5: ResourceControllerTests                                                                                                                                            
 5/24 Test  #5: ResourceControllerTests ..........   Passed    0.01 sec                                                                                                            
      Start  6: WdtUrlTests                                                                                                                                                        
 6/24 Test  #6: WdtUrlTests ......................   Passed    0.01 sec                                                                                                            
      Start  7: WdtMiscTests                                                                                                                                                       
 7/24 Test  #7: WdtMiscTests .....................   Passed   11.50 sec                                                                                                            
      Start  8: WdtFdTests                                                                                                                                                         
 8/24 Test  #8: WdtFdTests .......................   Passed    0.03 sec                                                                                                            
      Start  9: EncryptionTests                                                                                                                                                    
 9/24 Test  #9: EncryptionTests ..................   Passed    0.01 sec                                                                                                            
      Start 10: FileReaderTests                                                                                                                                                    
10/24 Test #10: FileReaderTests ..................   Passed    0.06 sec                                                                                                            
      Start 11: WdtRandGenTest                                                                                                                                                     
11/24 Test #11: WdtRandGenTest ...................***Failed    0.01 sec                                                                                                            
      Start 12: WdtBasicE2E                                                                                                                                                        
12/24 Test #12: WdtBasicE2E ......................***Failed    0.92 sec                                                                                                            
      Start 13: WdtLockFailFast                                                                                                                                                    
13/24 Test #13: WdtLockFailFast ..................***Failed    0.03 sec                                                                                                            
      Start 14: WdtBasicE2Exfs                                                                                                                                                     
14/24 Test #14: WdtBasicE2Exfs ...................   Passed    0.01 sec                                                                                                            
      Start 15: WdtOptionsTypeTests                                                                                                                                                
15/24 Test #15: WdtOptionsTypeTests ..............***Failed    0.01 sec                                                                                                            
      Start 16: hostname_override_test                                                                                                                                             
16/24 Test #16: hostname_override_test ...........***Failed    0.06 sec                                                                                                            
      Start 17: WdtPortBlockTest                                                                                                                                                   
17/24 Test #17: WdtPortBlockTest .................***Failed    0.06 sec                                                                                                            
      Start 18: WdtProtocolNegotiationTest                                                                                                                                         
18/24 Test #18: WdtProtocolNegotiationTest .......***Failed    0.07 sec                                                                                                            
      Start 19: WdtSimpleOdirectTest                                                                                                                                               
19/24 Test #19: WdtSimpleOdirectTest .............***Failed    0.92 sec                                                                                                            
      Start 20: WdtFileListTest                                                                                                                                                    
20/24 Test #20: WdtFileListTest ..................***Failed    0.06 sec                                                                                                            
      Start 21: WdtOverwriteTest                                                                                                                                                   
21/24 Test #21: WdtOverwriteTest .................***Failed    0.06 sec                                                                                                            
      Start 22: WdtBadServerTest                                                                                                                                                   
22/24 Test #22: WdtBadServerTest .................***Failed    0.07 sec                                                                                                            
      Start 23: ReceiverThrottlerRefCountTest                                                                                                                                      
23/24 Test #23: ReceiverThrottlerRefCountTest ....***Failed    0.01 sec                                                                                                            
      Start 24: WdtLongRunningTest                                                                                                                                                 
24/24 Test #24: WdtLongRunningTest ...............***Failed    0.06 sec                                                                                                            

42% tests passed, 14 tests failed out of 24                                                                                                                                        

Total Test time (real) =  15.42 sec                                                                                                                                                

The following tests FAILED:                                                                                                                                                        
          1 - AllTestsInGenTest (Failed)                                                                                                                                           
         11 - WdtRandGenTest (Failed)                                                                                                                                              
         12 - WdtBasicE2E (Failed)                                                                                                                                                 
         13 - WdtLockFailFast (Failed)                                                                                                                                             
         15 - WdtOptionsTypeTests (Failed)                                                                                                                                         
         16 - hostname_override_test (Failed)                                                                                                                                      
         17 - WdtPortBlockTest (Failed)                                                                                                                                            
         18 - WdtProtocolNegotiationTest (Failed)                                                                                                                                  
         19 - WdtSimpleOdirectTest (Failed)                                                                                                                                        
         20 - WdtFileListTest (Failed)                                                                                                                                             
         21 - WdtOverwriteTest (Failed)                                                                                                                                            
         22 - WdtBadServerTest (Failed)                                                                                                                                            
         23 - ReceiverThrottlerRefCountTest (Failed)                                                                                                                               
         24 - WdtLongRunningTest (Failed)                                                                                                                                          
Errors while running CTest                                                                                                                                                         
make: *** [RUN_TESTS_buildpart_0] Error 8                                                                                                                                          
Command /bin/sh failed with exit code 2                                                                                                                                            

** BUILD FAILED **                                                                                                                                                                 

The following build commands failed:                                                                                                                                               
        PhaseScriptExecution CMake\ PostBuild\ Rules /Users/harrym/Development/wdt/wdt-mac/WDT.build/Debug/RUN_TESTS.build/Script-B705458E21D9403FBA60FBF1.sh                      
(1 failure)          

I have managed to get this down to 1 - AllTestsInGenTest (Failed) by fixing the paths in the wdt test scripts. When building with Xcode the binaries are in /Debug or /Release folders inside the build folder. e.g. WDT_BINARY="./_bin/wdt/Debug/wdt"

I think the binaries to be tested could be provided to the scripts as arguments and then CMake can fill the arguments in with generator-expressions.