Explorar el Código

qa190rb checks: LYNX --qa190rbtest and --selftest "qa190rb" (src/Qa190rbCheck.inc), core tests in tests/Qa190rbTests.inc

Ka1-S hace 1 semana
padre
commit
eef13f8cca
Se han modificado 4 ficheros con 41 adiciones y 1 borrados
  1. 19 1
      src/Main.cpp
  2. 17 0
      src/Qa190rbCheck.inc
  3. 4 0
      tests/Qa190rbTests.inc
  4. 1 0
      tests/tests.cpp

+ 19 - 1
src/Main.cpp

@@ -1846,6 +1846,18 @@ public:
             return;
         }
 
+        if (args.contains ("--qa190rbtest"))
+        {
+            // LYNX --qa190rbtest report.txt (round 190rb, the 0.1.32 quality round's crash / memory fixes; also in
+            // --selftest): src/Qa190rbCheck.inc
+            juce::LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);
+            juce::String log;
+            const auto result = qa190rbCheck (log);
+            juce::File (args[args.indexOf ("--qa190rbtest") + 1].unquoted()).replaceWithText (log + "qa190rb=" + result + "\n");
+            setApplicationReturnValue (result == "OK" ? 0 : 1);
+            quit();
+            return;
+        }
         if (args.contains ("--hotfix190ra"))
         {
             // LYNX --hotfix190ra <prefix> [--part name]... [--plugin file]... (hotfix 0.1.31.2, round 190ra): src/Hotfix190ra.inc;
@@ -9483,6 +9495,10 @@ private:
         const auto hotfixPlacesResult = hotfixPlaces190qpCheck();
         // hotfix 0.1.31.2 (round 190ra): every list of the start page scrolled and painted (src/Hotfix190ra.inc)
         const auto startPageScrollResult = startPageScroll190raCheck();
+        // round 190rb (0.1.32 quality release, in 0.1.31.2): the crash / memory fixes of the crash reports, the sanitizer
+        // build and the UI monkey test (src/Qa190rbCheck.inc)
+        juce::String qa190rbLog;
+        const auto qa190rbResult = qa190rbCheck (qa190rbLog);
 
         // round 190pv (issue #258): a cloned channel's own automation clip drives its sound (src/Issue258Test.inc: the app's
         // engine, render-ahead off and on; Transistor Bass when FL Studio is here, LYNX Synth always)
@@ -10727,7 +10743,7 @@ private:
                         && keys190nuResult == "OK" && rollup031s3Result == "OK"
                         && helix4khs190ocResult == "OK" && rollup031s4Result == "OK" && sections190olResult == "OK" && rollup031s5Result == "OK" && simpleDuck190otResult == "OK" && tracks190peResult == "OK" && issue258Result == "OK" && autolive190qpResult == "OK" && issue282Result == "OK" && chordlane190pfResult == "OK" && autolinks190ovResult == "OK"
                         && trackstates190opResult == "OK" && rollup031s6Result == "OK" // (round 190op's item, reported but not counted in its branch: rollup 0.1.31 step 6)
-                        && rollup031s7Result == "OK" && rollup031s8Result == "OK" && headerGearResult == "OK" && perTab259Result == "OK" && hotfixPlacesResult == "OK" && startPageScrollResult.startsWith ("OK") // (rollup 0.1.31 step 7, round 190pw; and the three rounds' items its branches reported but did not count:)
+                        && rollup031s7Result == "OK" && rollup031s8Result == "OK" && headerGearResult == "OK" && perTab259Result == "OK" && hotfixPlacesResult == "OK" && startPageScrollResult.startsWith ("OK") && qa190rbResult == "OK" // (rollup 0.1.31 step 7, round 190pw; and the three rounds' items its branches reported but did not count:)
                         && slides190piResult == "OK" && automodes190paResult == "OK" && heldSteps190ozResult == "OK"
                         && flparity190prResult == "OK"
                         && hotfix190qpWfResult == "OK" // (round 190qp)
@@ -10839,6 +10855,7 @@ private:
                << "pertab259=" << perTab259Result << "\n"
                << "hotfixplaces190qp=" << hotfixPlacesResult << "\n"
                << "startpagescroll190ra=" << startPageScrollResult << "\n"
+               << "qa190rb=" << qa190rbResult << "\n"
                << "simpleduck190ot=" << simpleDuck190otResult << "\n"
                << "tracks190pe=" << tracks190peResult << "\n"
                << "issue258=" << issue258Result << "\n"
@@ -20661,6 +20678,7 @@ private:
 #include "PerTabShot259.inc" // round 190pw (PR #259)
 #include "HotfixUi190qp.inc" // hotfix 0.1.31.1 (round 190qp)
 #include "Hotfix190ra.inc" // hotfix 0.1.31.2 (round 190ra)
+#include "Qa190rbCheck.inc" // round 190rb: the 0.1.32 quality round's crash / memory fixes, checked (in 0.1.31.2)
 #include "TrackerShot190nw.inc" // round 190nw
 #include "IssuesShot190nq.inc" // round 190nq (issues #193, #225-#230)
 #include "Research190onShot.inc" // round 190on (research190oe P2, P8, P10)

+ 17 - 0
src/Qa190rbCheck.inc

@@ -0,0 +1,17 @@
+    // Round 190rb (0.1.32 quality release: crashes and memory bugs, from the crash reports, the sanitizer build and the
+    // UI monkey test): each fix checked through the real components, off screen. Included in the app class of Main.cpp;
+    // LYNX --qa190rbtest report.txt; --selftest "qa190rb". Run it in the sanitizer build (scripts/build-sanitize.sh) too:
+    // the old code read freed or out-of-range memory there, which ASan names.
+    juce::String qa190rbCheck (juce::String& log)
+    {
+        using namespace lynx;
+        const juce::ScopedValueSetter<bool> shown (ui::showingForShots(), true);
+        juce::String result = "OK";
+        const auto check = [&] (const juce::String& what, bool ok) {
+            log << (ok ? "ok   " : "FAIL ") << what << "\n";
+            if (! ok && result == "OK")
+                result = "ERROR " + what;
+        };
+
+        return result;
+    }

+ 4 - 0
tests/Qa190rbTests.inc

@@ -0,0 +1,4 @@
+// Round 190rb (0.1.32 quality release): crashes and memory bugs found in the crash reports since 0.1.29, the sanitizer
+// build (scripts/build-sanitize.sh: ASan + UBSan) and the UI monkey test (tools/ui_monkey.py). The UI fixes are checked
+// by --qa190rbtest / --selftest "qa190rb" (src/Qa190rbCheck.inc); the core ones here.
+

+ 1 - 0
tests/tests.cpp

@@ -18117,3 +18117,4 @@ TEST (fl_low_lifter_matches_fl_engine)
 #include "Issues274_190qrTests.inc" // round 190qr: issues #278 (AppImage manager entries), #281 (markers delete)
 #include "Hotfix190rcFlpDataTests.inc" // round 190rc: the .flp export writes the project data folder only when it is on this computer (FL 2026: "Invalid project data folder")
 #include "Hotfix190rcPresetsTests.inc" // round 190rc: issue #288, FL presets of the native generators open the generator itself
+#include "Qa190rbTests.inc" // round 190rb (0.1.32 quality): crash / memory fixes from the crash reports, ASan / UBSan and the UI monkey