Skip to content

Commit e8c8a86

Browse files
committed
Delete no-compile generated files
1 parent 3dd34de commit e8c8a86

16 files changed

Lines changed: 16 additions & 999 deletions

tests/lit/lit/formats/Cpp2RustTest.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
import lit.Test
55
import lit.util
66
from .base import TestFormat
7-
import difflib, os, re, shutil, random
7+
import difflib, os, re, shutil, random, sys
88
import tomli
99

10+
CURRENT_OS = 'macos' if sys.platform == 'darwin' else 'linux'
11+
ENTRY_RE = re.compile(r'(\w+)(?:\s*\(([^)]*)\))?')
12+
1013
def read_rust_version():
1114
toolchain_path = os.path.join(os.path.dirname(__file__),
1215
'../../../../libcc2rs/rust-toolchain.toml')
@@ -69,17 +72,24 @@ def execute(self, test, litConfig):
6972
def matches_model(match, model):
7073
if match is None:
7174
return False
72-
models = match.group(1)
73-
if models is None or models.strip() == '':
75+
spec = match.group(1)
76+
if spec is None or spec.strip() == '':
7477
return True
75-
return model in re.split(r'\s*,\s*', models.strip())
78+
for entry in ENTRY_RE.finditer(spec):
79+
if entry.group(1) != model:
80+
continue
81+
os_list = entry.group(2)
82+
if os_list is None:
83+
return True
84+
if CURRENT_OS in [o.strip() for o in os_list.split(',')]:
85+
return True
86+
return False
7687

7788
should_fail = False
7889
fail_code = lit.Test.FAIL
7990
xfail = self.regex_xfail.search(text)
8091
if xfail:
81-
xfail = re.split(r'\s*,\s*', xfail.group(1))
82-
should_fail = model in xfail
92+
should_fail = matches_model(xfail, model)
8393
fail_code = lit.Test.XFAIL
8494

8595
should_panic = matches_model(self.regex_panic.search(text), model)

tests/unit/out/refcount/union_cross_arm_cast.rs

Lines changed: 0 additions & 80 deletions
This file was deleted.

tests/unit/out/refcount/union_field_alignment.rs

Lines changed: 0 additions & 30 deletions
This file was deleted.

tests/unit/out/refcount/union_flex_array_member.rs

Lines changed: 0 additions & 73 deletions
This file was deleted.

tests/unit/out/refcount/union_memset_memcpy.rs

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)