From 1a94247851f040d53c232dbf683dba6e95510007 Mon Sep 17 00:00:00 2001 From: Nikola Matic Date: Wed, 6 Sep 2023 13:24:40 +0200 Subject: [PATCH] fixup! Bytecode compare fix --- scripts/isolate_tests.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/isolate_tests.py b/scripts/isolate_tests.py index 65d1eec11..974a6ce86 100755 --- a/scripts/isolate_tests.py +++ b/scripts/isolate_tests.py @@ -153,19 +153,23 @@ if __name__ == '__main__': # ignore the test with broken utf-8 encoding and experimental tests exclude_files = { "invalid_utf8_sequence.sol", - "stub.sol" + } + + exclude_subdirs = { + "_build", + "compilationTests", + "experimental" } if isfile(path): extract_and_write(path, options.language) else: - for root, subdirs, files in os.walk(path): - if '_build' in subdirs: - subdirs.remove('_build') - if 'compilationTests' in subdirs: - subdirs.remove('compilationTests') + for root, subdirs, files in os.walk(path, topdown=True): + # exclude specific directories from being recursed further + subdirs[:] = [d for d in subdirs if d not in exclude_subdirs] for f in files: if basename(f) in exclude_files: continue path = join(root, f) + print(path) extract_and_write(path, options.language)