| 1041 | |
| 1042 | |
| 1043 | def collect_info(info): |
| 1044 | error = False |
| 1045 | info_add = info.add |
| 1046 | |
| 1047 | for collect_func in ( |
| 1048 | # collect_urandom() must be the first, to check the getrandom() status. |
| 1049 | # Other functions may block on os.urandom() indirectly and so change |
| 1050 | # its state. |
| 1051 | collect_urandom, |
| 1052 | |
| 1053 | collect_builtins, |
| 1054 | collect_cc, |
| 1055 | collect_curses, |
| 1056 | collect_datetime, |
| 1057 | collect_decimal, |
| 1058 | collect_expat, |
| 1059 | collect_fips, |
| 1060 | collect_gdb, |
| 1061 | collect_gdbm, |
| 1062 | collect_get_config, |
| 1063 | collect_locale, |
| 1064 | collect_os, |
| 1065 | collect_platform, |
| 1066 | collect_pwd, |
| 1067 | collect_readline, |
| 1068 | collect_resource, |
| 1069 | collect_socket, |
| 1070 | collect_sqlite, |
| 1071 | collect_ssl, |
| 1072 | collect_subprocess, |
| 1073 | collect_sys, |
| 1074 | collect_sysconfig, |
| 1075 | collect_testcapi, |
| 1076 | collect_testinternalcapi, |
| 1077 | collect_tempfile, |
| 1078 | collect_time, |
| 1079 | collect_tkinter, |
| 1080 | collect_windows, |
| 1081 | collect_zlib, |
| 1082 | collect_zstd, |
| 1083 | collect_libregrtest_utils, |
| 1084 | |
| 1085 | # Collecting from tests should be last as they have side effects. |
| 1086 | collect_test_socket, |
| 1087 | collect_support, |
| 1088 | collect_support_os_helper, |
| 1089 | collect_support_socket_helper, |
| 1090 | collect_support_threading_helper, |
| 1091 | ): |
| 1092 | try: |
| 1093 | collect_func(info_add) |
| 1094 | except Exception: |
| 1095 | error = True |
| 1096 | print("ERROR: %s() failed" % (collect_func.__name__), |
| 1097 | file=sys.stderr) |
| 1098 | traceback.print_exc(file=sys.stderr) |
| 1099 | print(file=sys.stderr) |
| 1100 | sys.stderr.flush() |