[libcxx][pretty printers] Correct tests run detection
authorDavid Spickett <david.spickett@linaro.org>
Thu, 7 Oct 2021 12:36:01 +0000 (13:36 +0100)
committerDavid Spickett <david.spickett@linaro.org>
Thu, 7 Oct 2021 12:36:01 +0000 (13:36 +0100)
Missing "global" meant that we set a local "has_run_tests"
so the global was False by the time everything has run.

libcxx/test/libcxx/gdb/gdb_pretty_printer_test.py

index 484ac90..c64efa3 100644 (file)
@@ -37,6 +37,8 @@ class CheckResult(gdb.Command):
             "print_and_compare", gdb.COMMAND_DATA)
 
     def invoke(self, arg, from_tty):
+        global has_run_tests
+
         try:
             has_run_tests = True