Skip to content

Commit 1f5537f

Browse files
committed
Remove old update-unittest-tags
1 parent f2d703e commit 1f5537f

File tree

1 file changed

+0
-201
lines changed

1 file changed

+0
-201
lines changed

mx.graalpython/mx_graalpython.py

Lines changed: 0 additions & 201 deletions
Original file line numberDiff line numberDiff line change
@@ -465,206 +465,6 @@ def compare_unittests(args):
465465
mx.run([sys.executable, "graalpython/com.oracle.graal.python.test/src/compare_unittests.py", "-v"] + args)
466466

467467

468-
def _read_tags(path='.'):
469-
tags = set()
470-
tagfiles = glob.glob(os.path.join(path, 'graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/*.txt'))
471-
for tagfile in tagfiles:
472-
with open(tagfile) as f:
473-
tags |= {(os.path.basename(tagfile), line.strip()) for line in f if line.strip()}
474-
return tags
475-
476-
477-
def _write_tags(tags, path='.'):
478-
tagdir = os.path.join(path, 'graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/')
479-
tagfiles = glob.glob(os.path.join(path, 'graalpython/com.oracle.graal.python.test/src/tests/unittest_tags/*.txt'))
480-
for file in tagfiles:
481-
os.unlink(file)
482-
for file, stags in itertools.groupby(sorted(tags), key=lambda x: x[0]):
483-
with open(os.path.join(tagdir, file), 'w') as f:
484-
for tag in stags:
485-
f.write(tag[1] + '\n')
486-
487-
488-
def _fetch_tags_for_platform(parsed_args, platform):
489-
oldpwd = os.getcwd()
490-
with tempfile.TemporaryDirectory(prefix='graalpython-update-tags-') as d:
491-
os.chdir(d)
492-
try:
493-
tarfile = 'unittest-tags-{}.tar.bz2'.format(platform)
494-
url = '{}/{}'.format(parsed_args.tags_directory_url.rstrip('/'), tarfile)
495-
print(mx.colorize('Download from %s' % (url), color='magenta', bright=True, stream=sys.stdout))
496-
mx.run(['curl', '-O', url])
497-
out = mx.OutputCapture()
498-
mx.run(['file', tarfile], out=out)
499-
if 'HTML' in out.data:
500-
if not mx.ask_yes_no('Download failed! please download %s manually to %s and type (y) '
501-
'to continue.' % (url, d), default='y'):
502-
sys.exit(1)
503-
os.mkdir(platform)
504-
mx.run(['tar', 'xf', tarfile, '-C', platform])
505-
return _read_tags(platform)
506-
finally:
507-
os.chdir(oldpwd)
508-
509-
510-
def update_unittest_tags(args):
511-
sys.exit("[GR-59659] This command is temporarily disabled. If you're doing rota, just skip this step")
512-
parser = ArgumentParser('mx python-update-unittest-tags')
513-
parser.add_argument('tags_directory_url')
514-
parser.add_argument('--untag', action='store_true', help="Allow untagging existing tests")
515-
parsed_args = parser.parse_args(args)
516-
517-
current_tags = _read_tags()
518-
linux_tags = _fetch_tags_for_platform(parsed_args, 'linux')
519-
darwin_tags = _fetch_tags_for_platform(parsed_args, 'darwin')
520-
521-
tag_exclusions = [
522-
# This test times out in the gate even though it succeeds locally and in the retagger. Race condition?
523-
'graalpython.lib-python.3.test.test_cprofile.CProfileTest.test_run_profile_as_module',
524-
# The following two try to read bytecode and fail randomly as our co_code is changing
525-
'graalpython.lib-python.3.test.test_modulefinder.ModuleFinderTest.test_bytecode',
526-
'graalpython.lib-python.3.test.test_modulefinder.ModuleFinderTest.test_relative_imports_4',
527-
# Temporarily disabled due to object identity or race condition (GR-24863)
528-
'graalpython.lib-python.3.test.test_weakref.MappingTestCase.test_threaded_weak_key_dict_deepcopy',
529-
# Temporarily disabled due to transient failures (GR-30641)
530-
'graalpython.lib-python.3.test.test_import.__init__.ImportTests.test_concurrency',
531-
# Disabled since this fails on Darwin when run in parallel with many other tests
532-
'graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_login_cram_md5_bytes',
533-
'graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_login_cram_md5_plain_text',
534-
'graalpython.lib-python.3.test.test_imaplib.NewIMAPSSLTests.test_valid_authentication_plain_text',
535-
'graalpython.lib-python.3.test.test_imaplib.NewIMAPTests.test_login_cram_md5_bytes',
536-
'graalpython.lib-python.3.test.test_imaplib.NewIMAPTests.test_login_cram_md5_plain_text',
537-
'graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_noop',
538-
'graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_pass_',
539-
'graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_apop_normal',
540-
'graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_capa',
541-
'graalpython.lib-python.3.test.test_poplib.TestPOP3_TLSClass.test_dele',
542-
# Disabled because these tests hang on Darwin
543-
'graalpython.lib-python.3.test.test_logging.ConfigDictTest.test_listen_config_1_ok',
544-
'graalpython.lib-python.3.test.test_logging.ConfigDictTest.test_listen_config_10_ok',
545-
'graalpython.lib-python.3.test.test_logging.ConfigDictTest.test_listen_verify',
546-
# GC-related transients
547-
'graalpython.lib-python.3.test.test_weakref.MappingTestCase.test_weak_keyed_len_cycles',
548-
'graalpython.lib-python.3.test.test_weakref.WeakMethodTestCase.test_callback_when_method_dead',
549-
'graalpython.lib-python.3.test.test_weakref.WeakMethodTestCase.test_callback_when_object_dead',
550-
'graalpython.lib-python.3.test.test_weakref.FinalizeTestCase.test_all_freed',
551-
'graalpython.lib-python.3.test.test_weakref.ReferencesTestCase.test_equality',
552-
'graalpython.lib-python.3.test.test_copy.TestCopy.test_copy_weakkeydict',
553-
'graalpython.lib-python.3.test.test_copy.TestCopy.test_deepcopy_weakkeydict',
554-
'graalpython.lib-python.3.test.test_deque.TestBasic.test_container_iterator',
555-
'graalpython.lib-python.3.test.test_mmap.MmapTests.test_weakref',
556-
'graalpython.lib-python.3.test.test_ast.AST_Tests.test_AST_garbage_collection',
557-
'graalpython.lib-python.3.test.test_module.ModuleTests.test_weakref',
558-
# Disabled since code object comparison is not stable for us
559-
'graalpython.lib-python.3.test.test_marshal.InstancingTestCase.testModule',
560-
'graalpython.lib-python.3.test.test_marshal.CodeTestCase.test_code',
561-
# Disabled since signaling isn't stable during parallel tests
562-
'graalpython.lib-python.3.test.test_faulthandler.FaultHandlerTests.test_sigbus',
563-
'graalpython.lib-python.3.test.test_faulthandler.FaultHandlerTests.test_sigill',
564-
# Disabled due to transient failure
565-
'graalpython.lib-python.3.test.test_multiprocessing_main_handling.SpawnCmdLineTest.*',
566-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.TestNoForkBomb.test_noforkbomb',
567-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithProcessesTestProcess.test_active_children',
568-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithProcessesTestProcess.test_error_on_stdio_flush_1',
569-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithProcessesTestProcess.test_parent_process',
570-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithThreadsTestProcess.test_error_on_stdio_flush_1',
571-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithThreadsTestProcess.test_error_on_stdio_flush_2',
572-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy._TestImportStar.test_import',
573-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithProcessesTestBarrier.test_default_timeout',
574-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithProcessesTestBarrier.test_timeout',
575-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithProcessesTestLogging.*',
576-
'graalpython.lib-python.3.test.test_pty.PtyTest.test_openpty',
577-
# Disabled due to transient stack overflow that fails to get caught and crashes the VM
578-
'graalpython.lib-python.3.test.test_exceptions.ExceptionTests.test_badisinstance',
579-
'graalpython.lib-python.3.test.test_exceptions.ExceptionTests.testInfiniteRecursion',
580-
'graalpython.lib-python.3.test.test_list.ListTest.test_repr_deep',
581-
'graalpython.lib-python.3.test.test_functools.TestPartialC.test_recursive_pickle',
582-
'graalpython.lib-python.3.test.test_functools.TestPartialCSubclass.test_recursive_pickle',
583-
'graalpython.lib-python.3.test.test_functools.TestPartialPy.test_recursive_pickle',
584-
'graalpython.lib-python.3.test.test_functools.TestPartialPySubclass.test_recursive_pickle',
585-
'graalpython.lib-python.3.test.test_plistlib.TestBinaryPlistlib.test_deep_nesting',
586-
# Transient, GR-41056
587-
'graalpython.lib-python.3.test.test_subprocess.POSIXProcessTestCase.test_swap_std_fds_with_one_closed',
588-
# Transient, at least on M1
589-
'ctypes.test.test_python_api.PythonAPITestCase.test_PyOS_snprintf',
590-
# Transient hash mismatch
591-
'lib2to3.tests.test_parser.TestPgen2Caching.test_load_grammar_from_subprocess',
592-
# Connects to internet, sometimes can't reach
593-
'graalpython.lib-python.3.test.test_ssl.NetworkedTests.test_timeout_connect_ex',
594-
# Transiently fails because it's dependent on timings
595-
'graalpython.lib-python.3.test.test_int.IntStrDigitLimitsTests.test_denial_of_service_prevented_int_to_str',
596-
'graalpython.lib-python.3.test.test_int.IntSubclassStrDigitLimitsTests.test_denial_of_service_prevented_int_to_str',
597-
# The whole suite transiently times out (GR-47822)
598-
'graalpython.lib-python.3.test.test_docxmlrpc.*',
599-
# The whole suite transiently times out (GR-47822)
600-
'graalpython.lib-python.3.test.test_xmlrpc.*',
601-
# The whole suite transiently times out (GR-47822)
602-
'graalpython.lib-python.3.test.test_httpservers.*',
603-
# Disabled because of fatal error in Sulong (GR-47592)
604-
'graalpython.lib-python.3.test.test_compileall.CommandLineTestsNoSourceEpoch.test_workers*',
605-
'graalpython.lib-python.3.test.test_compileall.CommandLineTestsWithSourceEpoch.test_workers*',
606-
# GR-48555 race condition when exitting right after join
607-
'graalpython.lib-python.3.test.test_threading.ThreadingExceptionTests.test_print_exception*',
608-
'graalpython.lib-python.3.test.test_threading.ThreadJoinOnShutdown.*',
609-
'graalpython.lib-python.3.test.test_threading.*finaliz*',
610-
'graalpython.lib-python.3.test.test_threading.*shutdown*',
611-
# GC-related transients
612-
'test.test_importlib.test_locks.*_LifetimeTests.test_all_locks',
613-
# Flaky buffer capi tests
614-
'graalpython.lib-python.3.test.test_buffer.TestBufferProtocol.test_ndarray_slice_assign_multidim',
615-
# Too unreliable in the CI
616-
'graalpython.lib-python.3.test.test_multiprocessing_graalpy.WithProcessesTestProcess.test_many_processes',
617-
'test.test_multiprocessing_spawn.test_processes.WithProcessesTestProcess.test_many_processes',
618-
'test.test_multiprocessing_spawn.test_threads.WithThreadsTestPool.test_terminate',
619-
# Transiently ends up with 2 processes
620-
'test.test_concurrent_futures.test_process_pool.ProcessPoolSpawnProcessPoolExecutorTest.test_idle_process_reuse_one',
621-
'test.test_concurrent_futures.test_process_pool.ProcessPoolSpawnProcessPoolExecutorTest.test_killed_child',
622-
'test.test_concurrent_futures.test_thread_pool.ThreadPoolExecutorTest.test_idle_thread_reuse',
623-
'graalpython.lib-python.3.test.test_threading.ThreadTests.test_join_nondaemon_on_shutdown',
624-
'graalpython.lib-python.3.test.test_threading.ThreadTests.test_import_from_another_thread',
625-
'graalpython.lib-python.3.test.test_threading.ThreadTests.test_finalization_shutdown',
626-
# Transiently times out GR-52666
627-
'test.test_concurrent_futures.test_shutdown.ProcessPoolSpawnProcessPoolShutdownTest.test_submit_after_interpreter_shutdown',
628-
'test.test_concurrent_futures.test_shutdown.ProcessPoolSpawnProcessPoolShutdownTest.test_del_shutdown',
629-
# Transient lists differ error GR-49936
630-
'graalpython.lib-python.3.test.test_buffer.TestBufferProtocol.test_ndarray_index_getitem_multidim',
631-
'graalpython.lib-python.3.test.test_buffer.TestBufferProtocol.test_ndarray_slice_redundant_suboffsets',
632-
'graalpython.lib-python.3.test.test_buffer.TestBufferProtocol.test_ndarray_slice_multidim',
633-
# Transient failure to delete semaphore on process death
634-
'test.test_multiprocessing_spawn.test_misc.TestResourceTracker.test_resource_tracker_sigkill',
635-
# Connecting to external page that sometimes times out
636-
'graalpython.lib-python.3.test.test_urllib2net.OtherNetworkTests.test_ftp',
637-
# Counting file descriptors, can randomly change due to finalizers
638-
'graalpython.lib-python.3.test.test_zipfile.TestsWithMultipleOpens.test_many_opens',
639-
# Weakref
640-
'unittest.test.test_assertions.Test_Assertions.test_assertRaises_frames_survival',
641-
# Transiently fails at line 395
642-
'graalpython.lib-python.3.test.test_glob.SymlinkLoopGlobTests.test_selflink',
643-
]
644-
645-
result_tags = linux_tags & darwin_tags
646-
result_tags = {
647-
(file, tag) for file, tag in result_tags
648-
if not any(fnmatch.fnmatch(tag.lstrip('*'), exclusion) for exclusion in tag_exclusions)
649-
}
650-
651-
if not parsed_args.untag:
652-
result_tags |= current_tags
653-
_write_tags(result_tags)
654-
655-
diff = linux_tags - darwin_tags
656-
if diff:
657-
mx.warn("The following tests work only on Linux:\n" + '\n'.join(x[1] for x in diff))
658-
659-
diff = darwin_tags - linux_tags
660-
if diff:
661-
mx.warn("The following tests work only on Darwin:\n" + '\n'.join(x[1] for x in diff))
662-
663-
diff = current_tags - result_tags
664-
if diff:
665-
mx.warn("Potential regressions:\n" + '\n'.join(x[1] for x in diff))
666-
667-
668468
class GraalPythonTags(object):
669469
junit = 'python-junit'
670470
junit_maven = 'python-junit-maven'
@@ -3135,7 +2935,6 @@ def graalpy_standalone_wrapper(args_in):
31352935
'python-gvm': [no_return(python_gvm), ''],
31362936
'python-unittests': [python3_unittests, ''],
31372937
'python-compare-unittests': [compare_unittests, ''],
3138-
'python-update-unittest-tags': [update_unittest_tags, ''],
31392938
'nativebuild': [nativebuild, ''],
31402939
'nativeclean': [nativeclean, ''],
31412940
'python-src-import': [mx_graalpython_import.import_python_sources, ''],

0 commit comments

Comments
 (0)