diff --git a/extras/fixture/src/unity_fixture.c b/extras/fixture/src/unity_fixture.c index 2771198f435b4ed60ee9c9659c22f055f2da1519..0a16f6cba1defe277823cff7e9560ba488444863 100644 --- a/extras/fixture/src/unity_fixture.c +++ b/extras/fixture/src/unity_fixture.c @@ -79,15 +79,21 @@ void UnityTestRunner(unityfunction* setup, Unity.TestFile = file; Unity.CurrentTestName = printableName; Unity.CurrentTestLineNumber = line; - if (!UnityFixture.Verbose) - UNITY_OUTPUT_CHAR('.'); - else + if (UnityFixture.Verbose) { UnityPrint(printableName); #ifndef UNITY_REPEAT_TEST_NAME Unity.CurrentTestName = NULL; #endif } + else if (UnityFixture.Silent) + { + /* Do Nothing */ + } + else + { + UNITY_OUTPUT_CHAR('.'); + } Unity.NumberOfTests++; UnityMalloc_StartTest(); @@ -120,13 +126,19 @@ void UnityIgnoreTest(const char* printableName, const char* group, const char* n { Unity.NumberOfTests++; Unity.TestIgnores++; - if (!UnityFixture.Verbose) - UNITY_OUTPUT_CHAR('!'); - else + if (UnityFixture.Verbose) { UnityPrint(printableName); UNITY_PRINT_EOL(); } + else if (UnityFixture.Silent) + { + /* Do Nothing */ + } + else + { + UNITY_OUTPUT_CHAR('!'); + } } } @@ -350,6 +362,7 @@ int UnityGetCommandLineOptions(int argc, const char* argv[]) { int i; UnityFixture.Verbose = 0; + UnityFixture.Silent = 0; UnityFixture.GroupFilter = 0; UnityFixture.NameFilter = 0; UnityFixture.RepeatCount = 1; @@ -364,6 +377,11 @@ int UnityGetCommandLineOptions(int argc, const char* argv[]) UnityFixture.Verbose = 1; i++; } + else if (strcmp(argv[i], "-s") == 0) + { + UnityFixture.Silent = 1; + i++; + } else if (strcmp(argv[i], "-g") == 0) { i++; diff --git a/extras/fixture/src/unity_fixture_internals.h b/extras/fixture/src/unity_fixture_internals.h index 00cee883078f4c9fa6db4ceea226644d16582a11..98d4d4430dcdea5cd081c1154e839be10337c748 100644 --- a/extras/fixture/src/unity_fixture_internals.h +++ b/extras/fixture/src/unity_fixture_internals.h @@ -16,6 +16,7 @@ extern "C" struct UNITY_FIXTURE_T { int Verbose; + int Silent; unsigned int RepeatCount; const char* NameFilter; const char* GroupFilter;