Rename to allow_debuginfod_tests
authorTom Tromey <tom@tromey.com>
Sun, 8 Jan 2023 17:49:20 +0000 (10:49 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jan 2023 20:18:57 +0000 (13:18 -0700)
This changes skip_debuginfod_tests to invert the sense, and renames it
to allow_debuginfod_tests.

gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
gdb/testsuite/lib/debuginfod-support.exp

index e2c77eb109f267380bcb5b0405ee3ce1db93f94b..c9cd8a30a1ca78c853bf48fea3cbcaef2873b1eb 100644 (file)
@@ -20,7 +20,7 @@ standard_testfile
 load_lib dwarf.exp
 load_lib debuginfod-support.exp
 
-require !skip_debuginfod_tests
+require allow_debuginfod_tests
 
 set sourcetmp [standard_output_file tmp-${srcfile}]
 set outputdir [standard_output_file {}]
index ad156f23d0346ff1ced43306e12742714d9500a8..50a8b512a4ada1e15535d134721de438699d4833 100644 (file)
 
 # Helper functions to make it easier to write debuginfod tests.
 
-# Return true if the debuginfod tests should be skipped, otherwise, return
+# Return true if the debuginfod tests should be run, otherwise, return
 # false.
-proc skip_debuginfod_tests {} {
+proc allow_debuginfod_tests {} {
     if [is_remote host] {
-       return true
+       return false
     }
 
     if { [which debuginfod] == 0 } {
-       return true
+       return false
     }
 
     if { [which curl] == 0 } {
        untested "cannot find curl"
-       return true
+       return false
     }
 
     # Skip testing if gdb was not configured with debuginfod.
@@ -39,10 +39,10 @@ proc skip_debuginfod_tests {} {
     if { [string first "with-debuginfod" \
              [eval exec $::GDB --quiet $::INTERNAL_GDBFLAGS \
                   --configuration]] == -1 } {
-       return true
+       return false
     }
 
-    return false
+    return true
 }
 
 # Create two directories within the current output directory.  One directory