1 /** 2 Copyright: Copyright (c) 2018, Joakim Brännström. All rights reserved. 3 License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) 4 Author: Joakim Brännström (joakim.brannstrom@gmx.com) 5 */ 6 module dextool_test.test_mutant_tester; 7 8 import dextool_test.utility; 9 10 // dfmt off 11 12 @("shall report the test case that killed the mutant") 13 unittest { 14 mixin(EnvSetup(globalTestdir)); 15 16 immutable program_cpp = (testEnv.outdir ~ "program.cpp").toString; 17 immutable program_bin = (testEnv.outdir ~ "program").toString; 18 19 copy(testData ~ "test_mutant_tester_one_mutation_point.cpp", program_cpp); 20 21 makeDextoolAnalyze(testEnv) 22 .addInputArg(program_cpp) 23 .run; 24 25 immutable compile_script = (testEnv.outdir ~ "compile.sh").toString; 26 immutable test_script = (testEnv.outdir ~ "test.sh").toString; 27 immutable analyze_script = (testEnv.outdir ~ "analyze.sh").toString; 28 29 File(compile_script, "w").write(format( 30 "#!/bin/bash 31 set -e 32 g++ %s -o %s 33 ", program_cpp, program_bin)); 34 35 File(test_script, "w").write( 36 "#!/bin/bash 37 exit 1 38 "); 39 40 File(analyze_script, "w").write(format( 41 "#!/bin/bash 42 set -e 43 test -e $1 && echo 'Failed 42' 44 " 45 )); 46 47 makeExecutable(compile_script); 48 makeExecutable(test_script); 49 makeExecutable(analyze_script); 50 51 auto r = dextool_test.makeDextool(testEnv) 52 .setWorkdir(".") 53 .args(["mutate"]) 54 .addArg(["test"]) 55 .addPostArg(["--mutant", "dcr"]) 56 .addPostArg(["--db", (testEnv.outdir ~ defaultDb).toString]) 57 .addPostArg(["--compile", compile_script]) 58 .addPostArg(["--test", test_script]) 59 .addPostArg(["--test-case-analyze-cmd", analyze_script]) 60 .addPostArg(["--test-timeout", "10000"]) 61 .run; 62 63 testConsecutiveSparseOrder!SubStr([`killed by ["Failed 42"]`]).shouldBeIn(r.stdout); 64 } 65 66 @("shall parse a gtest report for the test cases that killed the mutant") 67 unittest { 68 mixin(EnvSetup(globalTestdir)); 69 70 immutable program_cpp = (testEnv.outdir ~ "program.cpp").toString; 71 immutable program_bin = (testEnv.outdir ~ "program").toString; 72 73 copy(testData ~ "test_mutant_tester_one_mutation_point.cpp", program_cpp); 74 75 makeDextoolAnalyze(testEnv) 76 .addInputArg(program_cpp) 77 .run; 78 79 immutable compile_script = (testEnv.outdir ~ "compile.sh").toString; 80 immutable test_script = (testEnv.outdir ~ "test.sh").toString; 81 82 File(compile_script, "w").write(format( 83 "#!/bin/bash 84 set -e 85 g++ %s -o %s 86 ", program_cpp, program_bin)); 87 88 File(test_script, "w").write( 89 "#!/bin/bash 90 cat <<EOF 91 Running main() from gtest_main.cc 92 [==========] Running 17 tests from 1 test case. 93 [----------] Global test environment set-up. 94 [----------] 17 tests from MessageTest 95 [ RUN ] MessageTest.DefaultConstructor 96 /home/smurf/googletest/test/gtest-message_test.cc:48: Failure 97 Expected equality of these values: 98 true 99 false 100 [ FAILED ] MessageTest.DefaultConstructor (0 ms) 101 [ RUN ] MessageTest.CopyConstructor 102 [ OK ] MessageTest.CopyConstructor (0 ms) 103 [ RUN ] MessageTest.ConstructsFromCString 104 [ OK ] MessageTest.ConstructsFromCString (0 ms) 105 [ RUN ] MessageTest.StreamsFloat 106 [ OK ] MessageTest.StreamsFloat (0 ms) 107 [ RUN ] MessageTest.StreamsDouble 108 [ OK ] MessageTest.StreamsDouble (0 ms) 109 [ RUN ] MessageTest.StreamsPointer 110 [ OK ] MessageTest.StreamsPointer (0 ms) 111 [ RUN ] MessageTest.StreamsNullPointer 112 [ OK ] MessageTest.StreamsNullPointer (0 ms) 113 /home/smurf/googletest/test/gtest-message_test.cc:42: Failure 114 Expected equality of these values: 115 true 116 false 117 [ FAILED ] MessageTest.StreamsNullPointer (0 ms) 118 [ RUN ] MessageTest.StreamsCString 119 [ OK ] MessageTest.StreamsCString (0 ms) 120 [ RUN ] MessageTest.StreamsNullCString 121 [ OK ] MessageTest.StreamsNullCString (0 ms) 122 [ RUN ] MessageTest.StreamsString 123 [ OK ] MessageTest.StreamsString (0 ms) 124 [ RUN ] MessageTest.StreamsStringWithEmbeddedNUL 125 [ OK ] MessageTest.StreamsStringWithEmbeddedNUL (0 ms) 126 [ RUN ] MessageTest.StreamsNULChar 127 [ OK ] MessageTest.StreamsNULChar (0 ms) 128 [ RUN ] MessageTest.StreamsInt 129 [ OK ] MessageTest.StreamsInt (0 ms) 130 [ RUN ] MessageTest.StreamsBasicIoManip 131 [ OK ] MessageTest.StreamsBasicIoManip (0 ms) 132 [ RUN ] MessageTest.GetString 133 [ OK ] MessageTest.GetString (0 ms) 134 [ RUN ] MessageTest.StreamsToOStream 135 [ OK ] MessageTest.StreamsToOStream (0 ms) 136 [ RUN ] MessageTest.DoesNotTakeUpMuchStackSpace 137 [ OK ] MessageTest.DoesNotTakeUpMuchStackSpace (0 ms) 138 [----------] 17 tests from MessageTest (0 ms total) 139 140 [----------] Global test environment tear-down 141 [==========] 17 tests from 1 test case ran. (0 ms total) 142 [ PASSED ] 15 tests. 143 [ FAILED ] 2 test, listed below: 144 [ FAILED ] MessageTest.DefaultConstructor 145 146 2 FAILED TEST 147 EOF 148 exit 1 149 "); 150 151 makeExecutable(compile_script); 152 makeExecutable(test_script); 153 154 auto r = dextool_test.makeDextool(testEnv) 155 .setWorkdir(".") 156 .args(["mutate"]) 157 .addArg(["test"]) 158 .addPostArg(["--mutant", "dcr"]) 159 .addPostArg(["--db", (testEnv.outdir ~ defaultDb).toString]) 160 .addPostArg(["--compile", compile_script]) 161 .addPostArg(["--test", test_script]) 162 .addPostArg(["--test-case-analyze-builtin", "gtest"]) 163 .addPostArg(["--test-timeout", "10000"]) 164 .run; 165 166 testConsecutiveSparseOrder!SubStr([ 167 `killed by ["../../../../../../../smurf/googletest/test/gtest-message_test.cc:MessageTest.DefaultConstructor","../../../../../../../smurf/googletest/test/gtest-message_test.cc:MessageTest.StreamsNullPointer"]` 168 ]).shouldBeIn(r.stdout); 169 } 170 171 @("shall parse a ctest report for failing test cases when a mutant is killed") 172 unittest { 173 mixin(EnvSetup(globalTestdir)); 174 175 immutable program_cpp = (testEnv.outdir ~ "program.cpp").toString; 176 immutable program_bin = (testEnv.outdir ~ "program").toString; 177 178 copy(testData ~ "test_mutant_tester_one_mutation_point.cpp", program_cpp); 179 180 makeDextoolAnalyze(testEnv) 181 .addInputArg(program_cpp) 182 .run; 183 184 immutable compile_script = (testEnv.outdir ~ "compile.sh").toString; 185 immutable test_script = (testEnv.outdir ~ "test.sh").toString; 186 187 // the test data is gathered from google test when a mutation result in 188 // test cases segfaulting 189 File(compile_script, "w").write(format( 190 "#!/bin/bash 191 set -e 192 g++ %s -o %s 193 ", program_cpp, program_bin)); 194 195 File(test_script, "w").write( 196 `#!/bin/bash 197 cat <<EOF 198 Test project /dev/shm/gtest_mut 199 Start 41: gtest_unittest 200 Start 45: gtest_no_rtti_unittest 201 Start 35: gtest_repeat_test 202 Start 30: gtest-port_test 203 1/60 Test #45: gtest_no_rtti_unittest ..................***Exception: Other 0.30 sec 204 /dev/shm/gtest_mut/gtest_src/googletest/test/gtest_unittest.cc:3184: Test DISABLED_ShouldNotRun is listed more than once. 205 You forgot to list test DISABLED_ShouldNotRun. 206 207 Start 9: gmock-matchers_test 208 2/60 Test #41: gtest_unittest ..........................***Exception: Other 0.30 sec 209 /dev/shm/gtest_mut/gtest_src/googletest/test/gtest_unittest.cc:3184: Test DISABLED_ShouldNotRun is listed more than once. 210 You forgot to list test DISABLED_ShouldNotRun. 211 212 Start 1: gmock-actions_test 213 3/60 Test #1: gmock-actions_test ...................... Passed 0.81 sec 214 4/60 Test #9: gmock-matchers_test ..................... Passed 1.34 sec 215 Start 48: gtest_break_on_failure_unittest 216 Start 52: gtest_filter_unittest 217 5/60 Test #48: gtest_break_on_failure_unittest ......... Passed 0.72 sec 218 Start 57: gtest_throw_on_failure_test 219 6/60 Test #52: gtest_filter_unittest ................... Passed 0.72 sec 220 7/60 Test #30: gtest-port_test ......................... Passed 2.39 sec 221 8/60 Test #35: gtest_repeat_test ....................... Passed 2.39 sec 222 Start 40: gtest-typed-test_test 223 Start 20: gtest-death-test_test 224 Start 38: gtest-test-part_test 225 9/60 Test #40: gtest-typed-test_test ...................***Exception: Other 0.20 sec 226 /dev/shm/gtest_mut/gtest_src/googletest/test/gtest-typed-test_test.h:62: Test CanBeDefaultConstructed is listed more than once. 227 Test InitialSizeIsZero is listed more than once. 228 You forgot to list test CanBeDefaultConstructed. 229 You forgot to list test InitialSizeIsZero. 230 231 Start 8: gmock-internal-utils_test 232 10/60 Test #38: gtest-test-part_test .................... Passed 0.30 sec 233 11/60 Test #57: gtest_throw_on_failure_test ............. Passed 0.64 sec 234 Start 37: gtest_stress_test 235 Start 19: gmock_no_rtti_test 236 12/60 Test #20: gtest-death-test_test ................... Passed 0.61 sec 237 13/60 Test #8: gmock-internal-utils_test ............... Passed 0.30 sec 238 14/60 Test #37: gtest_stress_test ....................... Passed 0.16 sec 239 Start 13: gmock-spec-builders_test 240 Start 17: gmock_use_own_tuple_test 241 Start 47: gtest_use_own_tuple_test 242 15/60 Test #19: gmock_no_rtti_test ...................... Passed 0.17 sec 243 16/60 Test #17: gmock_use_own_tuple_test ................ Passed 0.13 sec 244 17/60 Test #13: gmock-spec-builders_test ................ Passed 0.13 sec 245 Start 29: gtest-param-test_test 246 Start 55: gtest_output_test 247 Start 51: gtest_env_var_test 248 18/60 Test #47: gtest_use_own_tuple_test ................ Passed 0.24 sec 249 19/60 Test #29: gtest-param-test_test ................... Passed 0.20 sec 250 Start 16: gmock_stress_test 251 Start 50: gtest_color_test 252 20/60 Test #51: gtest_env_var_test ...................... Passed 0.20 sec 253 21/60 Test #16: gmock_stress_test ....................... Passed 0.24 sec 254 Start 60: gtest_xml_output_unittest 255 Start 56: gtest_shuffle_test 256 22/60 Test #50: gtest_color_test ........................ Passed 0.36 sec 257 Start 53: gtest_help_test 258 23/60 Test #56: gtest_shuffle_test ...................... Passed 0.30 sec 259 24/60 Test #53: gtest_help_test ......................... Passed 0.09 sec 260 25/60 Test #55: gtest_output_test .......................***Failed 0.85 sec 261 F 262 ====================================================================== 263 FAIL: testOutput (__main__.GTestOutputTest) 264 ---------------------------------------------------------------------- 265 Traceback (most recent call last): 266 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_output_test.py", line 320, in testOutput 267 self.assertEqual(normalized_golden, normalized_actual) 268 AssertionError: 'The non-test part of the code is expected[26264 chars]s.\n' != 'gtest_output_test_.cc:#: Test Success is [647 chars]s.\n' 269 Diff is 26653 characters long. Set self.maxDiff to None to see it. 270 271 ---------------------------------------------------------------------- 272 Ran 1 test in 0.610s 273 274 FAILED (failures=1) 275 276 26/60 Test #60: gtest_xml_output_unittest ...............***Failed 0.44 sec 277 /dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_output_unittest.py:223: DeprecationWarning: Please use assertTrue instead. 278 self.assert_(p.exited) 279 /dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_output_unittest.py:224: DeprecationWarning: Please use assertEqual instead. 280 self.assertEquals(0, p.exit_code) 281 ./dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_test_utils.py:75: DeprecationWarning: Please use assertEqual instead. 282 self.assertEquals(Node.ELEMENT_NODE, actual_node.nodeType) 283 /dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_test_utils.py:92: DeprecationWarning: Please use assertTrue instead. 284 (expected_attr.name, actual_node.tagName)) 285 .FF. 286 ====================================================================== 287 FAIL: testFilteredTestXmlOutput (__main__.GTestXMLOutputUnitTest) 288 Verifies XML output when a filter is applied. 289 ---------------------------------------------------------------------- 290 Traceback (most recent call last): 291 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_output_unittest.py", line 264, in testFilteredTestXmlOutput 292 extra_args=['%s=SuccessfulTest.*' % GTEST_FILTER_FLAG]) 293 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_output_unittest.py", line 300, in _TestXmlOutput 294 expected_exit_code) 295 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_output_unittest.py", line 280, in _GetXmlOutput 296 '%s was killed by signal %d' % (gtest_prog_name, p.signal)) 297 AssertionError: False is not true : gtest_xml_output_unittest_ was killed by signal 6 298 299 ====================================================================== 300 FAIL: testSuppressedXmlOutput (__main__.GTestXMLOutputUnitTest) 301 ---------------------------------------------------------------------- 302 Traceback (most recent call last): 303 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_xml_output_unittest.py", line 246, in testSuppressedXmlOutput 304 '%s was killed by signal %d' % (GTEST_PROGRAM_NAME, p.signal)) 305 AssertionError: True is not false : gtest_xml_output_unittest_ was killed by signal 6 306 307 ---------------------------------------------------------------------- 308 Ran 5 tests in 0.233s 309 310 FAILED (failures=2) 311 312 Start 54: gtest_list_tests_unittest 313 Start 49: gtest_catch_exceptions_test 314 Start 59: gtest_xml_outfiles_test 315 Start 58: gtest_uninitialized_test 316 27/60 Test #58: gtest_uninitialized_test ................ Passed 0.07 sec 317 28/60 Test #59: gtest_xml_outfiles_test ................. Passed 0.08 sec 318 29/60 Test #49: gtest_catch_exceptions_test ............. Passed 0.10 sec 319 Start 12: gmock-port_test 320 Start 15: gmock_test 321 Start 11: gmock-nice-strict_test 322 30/60 Test #11: gmock-nice-strict_test .................. Passed 0.01 sec 323 31/60 Test #15: gmock_test .............................. Passed 0.01 sec 324 32/60 Test #12: gmock-port_test ......................... Passed 0.01 sec 325 Start 5: gmock-generated-function-mockers_test 326 Start 14: gmock_link_test 327 Start 33: gtest-printers_test 328 33/60 Test #33: gtest-printers_test ..................... Passed 0.00 sec 329 34/60 Test #14: gmock_link_test ......................... Passed 0.01 sec 330 35/60 Test #5: gmock-generated-function-mockers_test ... Passed 0.01 sec 331 Start 7: gmock-generated-matchers_test 332 Start 46: gtest-tuple_test 333 Start 24: gtest-listener_test 334 36/60 Test #24: gtest-listener_test ..................... Passed 0.00 sec 335 37/60 Test #46: gtest-tuple_test ........................ Passed 0.00 sec 336 38/60 Test #7: gmock-generated-matchers_test ........... Passed 0.01 sec 337 Start 36: gtest_sole_header_test 338 Start 42: gtest-unittest-api_test 339 Start 43: gtest-death-test_ex_nocatch_test 340 39/60 Test #43: gtest-death-test_ex_nocatch_test ........ Passed 0.00 sec 341 40/60 Test #42: gtest-unittest-api_test ................. Passed 0.01 sec 342 41/60 Test #36: gtest_sole_header_test .................. Passed 0.01 sec 343 Start 31: gtest_pred_impl_unittest 344 Start 44: gtest-death-test_ex_catch_test 345 Start 22: gtest-filepath_test 346 42/60 Test #31: gtest_pred_impl_unittest ................ Passed 0.01 sec 347 43/60 Test #54: gtest_list_tests_unittest ...............***Failed 0.66 sec 348 /dev/shm/gtest_mut/gtest_src/googletest/test/gtest_list_tests_unittest.py:171: DeprecationWarning: Please use assertTrue instead. 349 (LIST_TESTS_FLAG, flag_expression, ' '.join(args), output))) 350 .FFF 351 ====================================================================== 352 FAIL: testFlag (__main__.GTestListTestsUnitTest) 353 Tests using the --gtest_list_tests flag. 354 ---------------------------------------------------------------------- 355 Traceback (most recent call last): 356 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_list_tests_unittest.py", line 188, in testFlag 357 other_flag=None) 358 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_list_tests_unittest.py", line 166, in RunAndVerify 359 expected_output_re.pattern))) 360 AssertionError: None is not true : when gtest_list_tests is 1, the output of "--gtest_list_tests" is "", 361 which does not match regex "FooDeathTest\. 362 Test1 363 Foo\. 364 Bar1 365 Bar2 366 DISABLED_Bar3 367 Abc\. 368 Xyz 369 Def 370 FooBar\. 371 Baz 372 FooTest\. 373 Test1 374 DISABLED_Test2 375 Test3 376 TypedTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\. 377 TestA 378 TestB 379 TypedTest/1\. # TypeParam = int\s*\*( __ptr64)? 380 TestA 381 TestB 382 TypedTest/2\. # TypeParam = .*MyArray<bool,\s*42> 383 TestA 384 TestB 385 My/TypeParamTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\. 386 TestA 387 TestB 388 My/TypeParamTest/1\. # TypeParam = int\s*\*( __ptr64)? 389 TestA 390 TestB 391 My/TypeParamTest/2\. # TypeParam = .*MyArray<bool,\s*42> 392 TestA 393 TestB 394 MyInstantiation/ValueParamTest\. 395 TestA/0 # GetParam\(\) = one line 396 TestA/1 # GetParam\(\) = two\\nlines 397 TestA/2 # GetParam\(\) = a very\\nlo{241}\.\.\. 398 TestB/0 # GetParam\(\) = one line 399 TestB/1 # GetParam\(\) = two\\nlines 400 TestB/2 # GetParam\(\) = a very\\nlo{241}\.\.\. 401 " 402 403 ====================================================================== 404 FAIL: testOverrideNonFilterFlags (__main__.GTestListTestsUnitTest) 405 Tests that --gtest_list_tests overrides the non-filter flags. 406 ---------------------------------------------------------------------- 407 Traceback (most recent call last): 408 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_list_tests_unittest.py", line 195, in testOverrideNonFilterFlags 409 other_flag='--gtest_break_on_failure') 410 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_list_tests_unittest.py", line 166, in RunAndVerify 411 expected_output_re.pattern))) 412 AssertionError: None is not true : when gtest_list_tests is 1, the output of "--gtest_list_tests --gtest_break_on_failure" is "", 413 which does not match regex "FooDeathTest\. 414 Test1 415 Foo\. 416 Bar1 417 Bar2 418 DISABLED_Bar3 419 Abc\. 420 Xyz 421 Def 422 FooBar\. 423 Baz 424 FooTest\. 425 Test1 426 DISABLED_Test2 427 Test3 428 TypedTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\. 429 TestA 430 TestB 431 TypedTest/1\. # TypeParam = int\s*\*( __ptr64)? 432 TestA 433 TestB 434 TypedTest/2\. # TypeParam = .*MyArray<bool,\s*42> 435 TestA 436 TestB 437 My/TypeParamTest/0\. # TypeParam = (VeryLo{245}|class VeryLo{239})\.\.\. 438 TestA 439 TestB 440 My/TypeParamTest/1\. # TypeParam = int\s*\*( __ptr64)? 441 TestA 442 TestB 443 My/TypeParamTest/2\. # TypeParam = .*MyArray<bool,\s*42> 444 TestA 445 TestB 446 MyInstantiation/ValueParamTest\. 447 TestA/0 # GetParam\(\) = one line 448 TestA/1 # GetParam\(\) = two\\nlines 449 TestA/2 # GetParam\(\) = a very\\nlo{241}\.\.\. 450 TestB/0 # GetParam\(\) = one line 451 TestB/1 # GetParam\(\) = two\\nlines 452 TestB/2 # GetParam\(\) = a very\\nlo{241}\.\.\. 453 " 454 455 ====================================================================== 456 FAIL: testWithFilterFlags (__main__.GTestListTestsUnitTest) 457 Tests that --gtest_list_tests takes into account the 458 ---------------------------------------------------------------------- 459 Traceback (most recent call last): 460 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_list_tests_unittest.py", line 203, in testWithFilterFlags 461 other_flag='--gtest_filter=Foo*') 462 File "/dev/shm/gtest_mut/gtest_src/googletest/test/gtest_list_tests_unittest.py", line 166, in RunAndVerify 463 expected_output_re.pattern))) 464 AssertionError: None is not true : when gtest_list_tests is 1, the output of "--gtest_list_tests --gtest_filter=Foo*" is "", 465 which does not match regex "FooDeathTest\. 466 Test1 467 Foo\. 468 Bar1 469 Bar2 470 DISABLED_Bar3 471 FooBar\. 472 Baz 473 FooTest\. 474 Test1 475 DISABLED_Test2 476 Test3 477 " 478 479 ---------------------------------------------------------------------- 480 Ran 4 tests in 0.561s 481 482 FAILED (failures=3) 483 484 44/60 Test #22: gtest-filepath_test ..................... Passed 0.02 sec 485 45/60 Test #44: gtest-death-test_ex_catch_test .......... Passed 0.02 sec 486 Start 4: gmock-generated-actions_test 487 Start 21: gtest_environment_test 488 Start 2: gmock-cardinalities_test 489 Start 39: gtest_throw_on_failure_ex_test 490 46/60 Test #4: gmock-generated-actions_test ............ Passed 0.00 sec 491 47/60 Test #21: gtest_environment_test .................. Passed 0.00 sec 492 48/60 Test #2: gmock-cardinalities_test ................ Passed 0.00 sec 493 49/60 Test #39: gtest_throw_on_failure_ex_test .......... Passed 0.00 sec 494 Start 3: gmock_ex_test 495 Start 28: gtest-options_test 496 Start 18: gmock-more-actions_no_exception_test 497 Start 10: gmock-more-actions_test 498 50/60 Test #18: gmock-more-actions_no_exception_test .... Passed 0.00 sec 499 51/60 Test #3: gmock_ex_test ........................... Passed 0.01 sec 500 52/60 Test #28: gtest-options_test ...................... Passed 0.00 sec 501 53/60 Test #10: gmock-more-actions_test ................. Passed 0.00 sec 502 Start 34: gtest_prod_test 503 Start 6: gmock-generated-internal-utils_test 504 Start 27: gtest_no_test_unittest 505 Start 26: gtest-message_test 506 54/60 Test #27: gtest_no_test_unittest .................. Passed 0.00 sec 507 55/60 Test #26: gtest-message_test ...................... Passed 0.00 sec 508 56/60 Test #34: gtest_prod_test ......................... Passed 0.00 sec 509 57/60 Test #6: gmock-generated-internal-utils_test ..... Passed 0.00 sec 510 Start 25: gtest_main_unittest 511 Start 32: gtest_premature_exit_test 512 Start 23: gtest-linked_ptr_test 513 58/60 Test #23: gtest-linked_ptr_test ................... Passed 0.00 sec 514 59/60 Test #32: gtest_premature_exit_test ............... Passed 0.00 sec 515 60/60 Test #25: gtest_main_unittest ..................... Passed 0.00 sec 516 517 90% tests passed, 6 tests failed out of 60 518 519 Total Test time (real) = 4.88 sec 520 521 The following tests FAILED: 522 40 - gtest-typed-test_test (OTHER_FAULT) 523 41 - gtest_unittest (OTHER_FAULT) 524 45 - gtest_no_rtti_unittest (OTHER_FAULT) 525 54 - gtest_list_tests_unittest (Failed) 526 55 - gtest_output_test (Failed) 527 60 - gtest_xml_output_unittest (Failed) 528 EOF 529 exit 1 530 `); 531 532 makeExecutable(compile_script); 533 makeExecutable(test_script); 534 535 auto r = dextool_test.makeDextool(testEnv) 536 .setWorkdir(".") 537 .args(["mutate"]) 538 .addArg(["test"]) 539 .addPostArg(["--mutant", "dcr"]) 540 .addPostArg(["--db", (testEnv.outdir ~ defaultDb).toString]) 541 .addPostArg(["--compile", compile_script]) 542 .addPostArg(["--test", test_script]) 543 .addPostArg(["--test-case-analyze-builtin", "ctest"]) 544 .addPostArg(["--test-timeout", "10000"]) 545 .run; 546 547 testConsecutiveSparseOrder!SubStr([ 548 `killed by ["gtest-typed-test_test","gtest_unittest","gtest_no_rtti_unittest","gtest_list_tests_unittest","gtest_output_test","gtest_xml_output_unittest"]` 549 ]).shouldBeIn(r.stdout); 550 }