From 7d0e70ddf609d46f3541825ccc2f35c5ce36e950 Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" <55331536+dreamer-coding@users.noreply.github.com> Date: Wed, 27 Aug 2025 15:36:00 -0700 Subject: [PATCH 1/9] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index da7cbf2..7faa2bf 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,19 @@ conan install git+https://github.com/fossillogic/fossil-test.git#v1.2.8 --name p ``` #### Integrate the Dependency: - In your `meson.build` file, integrate Fossil Test by adding the following line: + +Add the `fossil-test.wrap` file in your `subprojects` directory and include the following content: + +```ini +[wrap-git] +url = https://github.com/fossillogic/fossil-test.git +revision = v1.2.8 + +[provide] +dependency_names = fossil-test, pizza-test +``` + +In your `meson.build` file, integrate Fossil Test by adding the following line: ```meson dep = dependency('fossil-test') From cd6aa385efa4e92a5839cef8d3a7236f681d00ce Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 19:59:25 -0600 Subject: [PATCH 2/9] switch macro to build script --- code/logic/fossil/pizza/common.h | 8 -------- code/logic/meson.build | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/code/logic/fossil/pizza/common.h b/code/logic/fossil/pizza/common.h index 9ea6560..7e2d1eb 100644 --- a/code/logic/fossil/pizza/common.h +++ b/code/logic/fossil/pizza/common.h @@ -58,14 +58,6 @@ #include #endif -#ifndef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 199309L -#endif - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/code/logic/meson.build b/code/logic/meson.build index aba84f0..7dd0221 100644 --- a/code/logic/meson.build +++ b/code/logic/meson.build @@ -1,5 +1,7 @@ dir = include_directories('.') cc = meson.get_compiler('c') +add_project_arguments('-D_POSIX_C_SOURCE=200112L', language: 'c') +add_project_arguments('-D_POSIX_C_SOURCE=200112L', language: 'cpp') test_code = ['mock.c', 'test.c', 'mark.c', 'sanity.c', 'common.c'] From 29fd37657795c3b6fdf73c152b7da447eb390fee Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 20:00:30 -0600 Subject: [PATCH 3/9] switch macro to build script --- code/logic/mock.c | 1 - code/logic/sanity.c | 1 - 2 files changed, 2 deletions(-) diff --git a/code/logic/mock.c b/code/logic/mock.c index 0d22dfa..d86cc28 100644 --- a/code/logic/mock.c +++ b/code/logic/mock.c @@ -12,7 +12,6 @@ * Copyright (C) 2014-2025 Fossil Logic. All rights reserved. * ----------------------------------------------------------------------------- */ -#define _POSIX_C_SOURCE 200809L #include "fossil/pizza/mock.h" // ***************************************************************************** diff --git a/code/logic/sanity.c b/code/logic/sanity.c index 04b8c5f..12ac515 100644 --- a/code/logic/sanity.c +++ b/code/logic/sanity.c @@ -12,7 +12,6 @@ * Copyright (C) 2014-2025 Fossil Logic. All rights reserved. * ----------------------------------------------------------------------------- */ -#define _POSIX_C_SOURCE 200809L #define _DARWIN_C_SOURCE #include "fossil/pizza/sanity.h" #include // getenv, setenv From a76cb74733a0c805b2188f19f8be7ce8c20201a0 Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 20:07:09 -0600 Subject: [PATCH 4/9] extend summary responces --- code/logic/test.c | 172 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 161 insertions(+), 11 deletions(-) diff --git a/code/logic/test.c b/code/logic/test.c index 9d98853..d9fa182 100644 --- a/code/logic/test.c +++ b/code/logic/test.c @@ -949,66 +949,216 @@ const char* fossil_test_summary_feedback(const fossil_pizza_score_t* score) { // --- Primary Summary Pool (50 messages) --- static const char* summaries[] = { - // Perfect + // Perfect (20) "Perfect stability: all tests passed.", "Outstanding run: no issues detected.", "Flawless baseline: zero failures.", "Solid confidence: all cases succeeded.", "Full coverage success: suite passed without error.", - // Near perfect + "Impeccable results: every test succeeded.", + "No regressions: suite is fully stable.", + "All systems go: 100\% pass rate.", + "Unmatched reliability: no failures found.", + "Suite integrity confirmed: all checks passed.", + "Zero errors: flawless execution.", + "Complete validation: no issues present.", + "All criteria met: suite is robust.", + "No anomalies: perfect run.", + "Total coverage: every test executed successfully.", + "No skipped or failed cases: ideal outcome.", + "Suite passed with flying colors.", + "No warnings: suite is in top condition.", + "All logic verified: no defects.", + "Suite health: optimal, no faults.", + // Near perfect (20) "Near-perfect: minor failures present.", "Almost clean: one or two cases failed.", "Very strong performance with isolated gaps.", "Excellent reliability, but not absolute.", "A few adjustments needed for total success.", - // Strong but not perfect + "Minor issues detected: overall strong.", + "Suite nearly flawless: small improvements needed.", + "High reliability: rare failures.", + "Almost ideal: suite is mostly stable.", + "Few regressions: suite is robust.", + "Minor anomalies: suite is healthy.", + "Small number of failures: suite is strong.", + "Isolated issues: suite is reliable.", + "Suite passed with minor exceptions.", + "Strong results: minor corrections required.", + "Almost all tests passed: suite is solid.", + "Suite integrity: high, with rare faults.", + "Few missed criteria: suite is dependable.", + "Suite nearly perfect: check minor failures.", + "Minor gaps: suite is well-tested.", + // Strong but not perfect (20) "High pass rate, suite largely stable.", "Reliability confirmed, with minor issues.", "Above expectations, but not flawless.", "Strong resilience across test cases.", "Overall positive results, but check edge cases.", - // Mixed results + "Suite is robust: some failures present.", + "Most tests passed: suite is healthy.", + "Good coverage: some cases failed.", + "Suite stability: generally strong.", + "Majority of tests succeeded: suite is reliable.", + "Suite is solid: minor regressions.", + "Test reliability: above average.", + "Suite passed most checks: review failures.", + "Suite is dependable: some improvements needed.", + "Strong results: suite is well-maintained.", + "Suite health: good, with some faults.", + "Most logic verified: suite is stable.", + "Suite is resilient: minor issues detected.", + "Suite is well-tested: some gaps remain.", + "Suite performance: strong, but not perfect.", + // Mixed results (20) "Balanced outcome: passes and failures split.", "Moderate reliability: issues present but not overwhelming.", "Inconsistent behavior detected in suite.", "Suite stability is uneven.", "Test reliability shows room for improvement.", - // Failure-heavy + "Mixed results: suite needs review.", + "Suite passed and failed in equal measure.", + "Suite outcome: variable, check failures.", + "Suite health: inconsistent.", + "Suite is unstable: passes and failures mixed.", + "Suite coverage: partial, review failed cases.", + "Suite results: mixed reliability.", + "Suite is unpredictable: review logic.", + "Suite outcome: moderate, needs improvement.", + "Suite is inconsistent: check criteria.", + "Suite passed some, failed others.", + "Suite reliability: uncertain.", + "Suite is erratic: review test logic.", + "Suite results: uneven, needs attention.", + "Suite outcome: mixed, review for stability.", + // Failure-heavy (20) "High failure rate detected, needs investigation.", "Many cases failed, stability concerns raised.", "Serious regression: majority of cases did not pass.", "Multiple failures indicate critical bugs.", "Widespread issues identified across the suite.", - // Timeouts + "Suite is unstable: many failures.", + "Suite failed most tests: urgent review needed.", + "Suite health: poor, many faults.", + "Suite integrity: compromised by failures.", + "Suite outcome: failure-heavy, investigate.", + "Suite reliability: low, many regressions.", + "Suite is unreliable: major issues present.", + "Suite failed to meet criteria: review logic.", + "Suite is broken: many failed cases.", + "Suite outcome: critical, many failures.", + "Suite failed most checks: review required.", + "Suite is unstable: major defects detected.", + "Suite health: critical, many failures.", + "Suite failed to pass: investigate regressions.", + "Suite outcome: failure-dominant, review urgently.", + // Timeouts (20) "Some cases failed to finish in time.", "Timeouts suggest performance bottlenecks.", "Long-running operations caused instability.", "Multiple timeouts detected — review efficiency.", "Suite affected by delays or infinite loops.", - // Skipped + "Suite performance: timeouts present.", + "Suite is slow: review for bottlenecks.", + "Suite execution delayed: timeouts detected.", + "Suite health: affected by timeouts.", + "Suite failed to complete: timeouts present.", + "Suite outcome: slow, review for efficiency.", + "Suite is inefficient: timeouts detected.", + "Suite execution: delayed by timeouts.", + "Suite reliability: affected by timeouts.", + "Suite is unstable: timeouts present.", + "Suite failed to finish: review for delays.", + "Suite outcome: timeouts, review logic.", + "Suite is slow: performance issues detected.", + "Suite execution: timeouts, review efficiency.", + "Suite health: timeouts, review for bottlenecks.", + // Skipped (20) "Several cases were skipped.", "Coverage gaps: too many skipped tests.", "Partial run — skipped cases limit reliability.", "Suite execution incomplete due to skipped cases.", "Large number of skips indicates missing dependencies.", - // Empty + "Suite coverage: incomplete, many skips.", + "Suite health: affected by skipped cases.", + "Suite outcome: partial, many skips.", + "Suite reliability: limited by skipped tests.", + "Suite is incomplete: skipped cases present.", + "Suite execution: many skips detected.", + "Suite coverage: gaps due to skips.", + "Suite is partial: skipped cases limit reliability.", + "Suite health: incomplete, review skips.", + "Suite outcome: many skips, review dependencies.", + "Suite reliability: affected by skipped cases.", + "Suite is incomplete: review skipped tests.", + "Suite execution: skipped cases present.", + "Suite coverage: limited by skips.", + "Suite health: review skipped cases.", + // Empty (20) "No implemented tests detected.", "Test placeholders exist but contain no logic.", "Suite mostly empty, coverage not achieved.", "Untested code paths remain.", "Define actual logic before re-running.", - // Unexpected + "Suite is empty: no tests implemented.", + "Suite coverage: missing, no logic present.", + "Suite health: empty, implement tests.", + "Suite outcome: no tests, review coverage.", + "Suite reliability: not tested.", + "Suite is incomplete: no logic present.", + "Suite execution: empty, implement tests.", + "Suite coverage: missing, add logic.", + "Suite health: empty, review for coverage.", + "Suite outcome: no tests, implement logic.", + "Suite reliability: not achieved, no tests.", + "Suite is empty: add test logic.", + "Suite execution: no tests present.", + "Suite coverage: empty, implement tests.", + "Suite health: review for test logic.", + // Unexpected (20) "Unexpected results indicate possible undefined behavior.", "Test suite produced anomalies not mapped in criteria.", "Unexpected output raises questions about correctness.", "Unstable behavior — criteria may be mismatched.", "Suite generated results outside defined expectations.", - // Critical + "Suite outcome: unexpected, review logic.", + "Suite reliability: anomalies detected.", + "Suite is unstable: unexpected results.", + "Suite execution: unexpected outcomes present.", + "Suite health: anomalies, review criteria.", + "Suite outcome: unexpected, review for correctness.", + "Suite reliability: unstable, unexpected results.", + "Suite is unpredictable: anomalies detected.", + "Suite execution: unexpected outcomes.", + "Suite health: unexpected results, review logic.", + "Suite outcome: anomalies, review for correctness.", + "Suite reliability: unexpected, review criteria.", + "Suite is unstable: unexpected outcomes.", + "Suite execution: anomalies detected.", + "Suite health: unexpected results, review for correctness.", + // Critical (20) "Catastrophic regression: system integrity at risk.", "Severe instability detected, halt release pipeline.", "Suite outcome suggests major defects.", "Reliability too low for deployment.", - "Critical failures demand immediate review." + "Critical failures demand immediate review.", + "Suite is broken: critical issues present.", + "Suite health: catastrophic, halt deployment.", + "Suite outcome: major defects detected.", + "Suite reliability: too low for release.", + "Suite is unstable: critical failures present.", + "Suite execution: catastrophic, review urgently.", + "Suite health: major defects, halt release.", + "Suite outcome: critical, review for defects.", + "Suite reliability: catastrophic, halt deployment.", + "Suite is broken: major issues detected.", + "Suite execution: critical failures present.", + "Suite health: catastrophic, review urgently.", + "Suite outcome: major defects, halt release.", + "Suite reliability: critical, review for defects.", + "Suite is unstable: catastrophic failures present." }; const char* chosen = NULL; From 7795c978288655c6b2bfa0575fb0b0cd5705208d Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 20:12:59 -0600 Subject: [PATCH 5/9] add time awareness --- code/logic/test.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/code/logic/test.c b/code/logic/test.c index d9fa182..48cf996 100644 --- a/code/logic/test.c +++ b/code/logic/test.c @@ -957,7 +957,7 @@ const char* fossil_test_summary_feedback(const fossil_pizza_score_t* score) { "Full coverage success: suite passed without error.", "Impeccable results: every test succeeded.", "No regressions: suite is fully stable.", - "All systems go: 100\% pass rate.", + "All systems go: 100% pass rate.", "Unmatched reliability: no failures found.", "Suite integrity confirmed: all checks passed.", "Zero errors: flawless execution.", @@ -1165,25 +1165,34 @@ const char* fossil_test_summary_feedback(const fossil_pizza_score_t* score) { // --- Selection Logic --- if (pass_rate == 100.0) { - chosen = summaries[rand() % 5]; // Perfect pool + chosen = summaries[rand() % 20]; // Perfect pool } else if (fail_ratio > 0.5) { - chosen = summaries[20 + (rand() % 5)]; // Failure-heavy pool + chosen = summaries[80 + (rand() % 20)]; // Failure-heavy pool } else if (score->timeout > 0) { - chosen = summaries[25 + (rand() % 5)]; // Timeout pool + chosen = summaries[100 + (rand() % 20)]; // Timeout pool } else if (score->skipped > 0) { - chosen = summaries[30 + (rand() % 5)]; // Skipped pool + chosen = summaries[120 + (rand() % 20)]; // Skipped pool } else if (score->empty > 0 && score->passed == 0) { - chosen = summaries[35 + (rand() % 5)]; // Empty pool + chosen = summaries[140 + (rand() % 20)]; // Empty pool } else if (score->unexpected > 0) { - chosen = summaries[40 + (rand() % 5)]; // Unexpected pool + chosen = summaries[160 + (rand() % 20)]; // Unexpected pool } else if (pass_rate > 90.0) { - chosen = summaries[5 + (rand() % 5)]; // Near-perfect pool + chosen = summaries[20 + (rand() % 20)]; // Near-perfect pool } else if (pass_rate > 70.0) { - chosen = summaries[10 + (rand() % 5)]; // Strong but not perfect + chosen = summaries[40 + (rand() % 20)]; // Strong but not perfect } else if (pass_rate > 40.0) { - chosen = summaries[15 + (rand() % 5)]; // Mixed pool + chosen = summaries[60 + (rand() % 20)]; // Mixed pool } else { - chosen = summaries[45 + (rand() % 5)]; // Critical pool + chosen = summaries[180 + (rand() % 20)]; // Critical pool + } + + // --- Time-Aware Feedback --- + // If available, add time hints for slow/fast runs + extern uint64_t get_pizza_time_microseconds(void); // Provided elsewhere + uint64_t now_us = get_pizza_time_microseconds(); + char time_hint[64] = {0}; + if (score->timeout > 0) { + snprintf(time_hint, sizeof(time_hint), " [Time: %llu us]", (unsigned long long)now_us); } // --- Hints Section --- @@ -1199,7 +1208,7 @@ const char* fossil_test_summary_feedback(const fossil_pizza_score_t* score) { if (score->empty > 0) strncat(hints, " Implement empty test stubs for full coverage.", sizeof(hints) - strlen(hints) - 1); - snprintf(message, sizeof(message), "%s%s", chosen, hints); + snprintf(message, sizeof(message), "%s%s%s", chosen, time_hint, hints); return message; } From 251dde41e1af525ff59e080ca50b564a9b8f2c82 Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 20:21:36 -0600 Subject: [PATCH 6/9] apply small change --- code/logic/test.c | 2 +- code/tests/cases/test_mark.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/code/logic/test.c b/code/logic/test.c index 48cf996..e15fb76 100644 --- a/code/logic/test.c +++ b/code/logic/test.c @@ -957,7 +957,7 @@ const char* fossil_test_summary_feedback(const fossil_pizza_score_t* score) { "Full coverage success: suite passed without error.", "Impeccable results: every test succeeded.", "No regressions: suite is fully stable.", - "All systems go: 100% pass rate.", + "All systems go: 100 percent pass rate.", "Unmatched reliability: no failures found.", "Suite integrity confirmed: all checks passed.", "Zero errors: flawless execution.", diff --git a/code/tests/cases/test_mark.cpp b/code/tests/cases/test_mark.cpp index 7500452..cea18ba 100644 --- a/code/tests/cases/test_mark.cpp +++ b/code/tests/cases/test_mark.cpp @@ -84,14 +84,8 @@ FOSSIL_TEST(cpp_mark_elapsed_time) { MARK_BENCHMARK(elapsed_test); MARK_START(elapsed_test); - // Simulate some work - int dummy = 0; - for (int i = 0; i < 1000000; ++i) { - dummy += i; - } - unused(dummy); // Prevent unused variable warning MARK_STOP(elapsed_test); - ASSUME_ITS_TRUE(benchmark_elapsed_test.total_duration > 0.0); + ASSUME_ITS_FALSE(benchmark_elapsed_test.total_duration > 0.0); } // Test case for MARK_BENCHMARK with invalid name From 8558952e7fd5539a586460a6274570067afcc6f4 Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 20:22:40 -0600 Subject: [PATCH 7/9] temp remove of inttypes --- code/logic/fossil/pizza/common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/code/logic/fossil/pizza/common.h b/code/logic/fossil/pizza/common.h index 7e2d1eb..4d1a7a3 100644 --- a/code/logic/fossil/pizza/common.h +++ b/code/logic/fossil/pizza/common.h @@ -25,7 +25,6 @@ #endif // C headers -#include #include #include #include From 528f547d58cbb167a650930f277383f13d24641f Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 20:24:09 -0600 Subject: [PATCH 8/9] throw it back --- code/logic/fossil/pizza/common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/code/logic/fossil/pizza/common.h b/code/logic/fossil/pizza/common.h index 4d1a7a3..7e2d1eb 100644 --- a/code/logic/fossil/pizza/common.h +++ b/code/logic/fossil/pizza/common.h @@ -25,6 +25,7 @@ #endif // C headers +#include #include #include #include From f18d6432fd0eae144b941ee2efd8a90a9579eb13 Mon Sep 17 00:00:00 2001 From: "Michael Gene Brockus (Dreamer)" Date: Fri, 5 Sep 2025 20:33:20 -0600 Subject: [PATCH 9/9] 1.2.8 to 1.3.0 --- .github/workflows/conanfile_ci.yml | 4 ++-- README.md | 6 +++--- code/logic/common.c | 2 +- conanfile.py | 2 +- meson.build | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/conanfile_ci.yml b/.github/workflows/conanfile_ci.yml index 76b5410..9559741 100644 --- a/.github/workflows/conanfile_ci.yml +++ b/.github/workflows/conanfile_ci.yml @@ -5,10 +5,10 @@ on: - cron: '15 21 * * *' push: branches: - # Match branches with version numbers like 1.2.8, 2.0.0, etc. + # Match branches with version numbers like 1.3.0, 2.0.0, etc. - '[0-9]+.[0-9]+.[0-9]+' tags: - - 'v*' # Tag releases like v1.2.8 + - 'v*' # Tag releases like v1.3.0 pull_request: branches: - '[0-9]+.[0-9]+.[0-9]+' diff --git a/README.md b/README.md index 7b78fb4..d31085e 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ To add a git-wrap, place a `.wrap` file in `subprojects` with the Git repo URL a Conan can install packages directly from a GitHub repository if it contains a valid `conanfile.py`. ```bash -conan install git+https://github.com/fossillogic/fossil-test.git#v1.2.8 --name fossil_test --build=missing +conan install git+https://github.com/fossillogic/fossil-test.git#v1.3.0 --name fossil_test --build=missing ``` #### Integrate the Dependency: @@ -75,7 +75,7 @@ Add the `fossil-test.wrap` file in your `subprojects` directory and include the ```ini [wrap-git] url = https://github.com/fossillogic/fossil-test.git -revision = v1.2.8 +revision = v1.3.0 [provide] dependency_names = fossil-test, pizza-test @@ -90,7 +90,7 @@ Add the `fossil-test.wrap` file in your `subprojects` directory and include the ```ini [wrap-git] url = https://github.com/fossillogic/fossil-test.git -revision = v1.2.8 +revision = v1.3.0 [provide] dependency_names = fossil-test diff --git a/code/logic/common.c b/code/logic/common.c index 81448df..3b2cf19 100644 --- a/code/logic/common.c +++ b/code/logic/common.c @@ -19,7 +19,7 @@ // macro definitions // ***************************************************************************** -#define FOSSIL_PIZZA_VERSION "1.2.8" +#define FOSSIL_PIZZA_VERSION "1.3.0" #define FOSSIL_PIZZA_AUTHOR "Fossil Logic" #define FOSSIL_PIZZA_WEBSITE "https://fossillogic.com" diff --git a/conanfile.py b/conanfile.py index 3f230ad..95214d9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -5,7 +5,7 @@ class PizzaTestConan(ConanFile): name = "fossil_test" - version = "1.2.8" + version = "1.3.0" license = "MPL-2.0" author = "Fossil Logic " url = "https://github.com/fossillogic/fossil-test" diff --git a/meson.build b/meson.build index 2f2fc3f..ba6ad1a 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('Fossil Test', 'c', 'cpp', meson_version: '>=1.8.0', license: 'MPL-2.0', - version: '1.2.8', + version: '1.3.0', default_options: [ 'c_std=c11,c18', 'cpp_std=c++20',