Skip to content

Commit 95b7e8a

Browse files
committed
Swift: make xcode-autobuilder tester work with several tests
1 parent e514855 commit 95b7e8a

File tree

8 files changed

+397
-23
lines changed

8 files changed

+397
-23
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
xcuserdata
22
build
33
*.actual
4+
IDEWorkspaceChecks.plist
Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1-
py_test(
2-
name = 'hello-autobuilder-test',
3-
size = "small",
4-
srcs = ['autobuild_tester.py'],
5-
main = 'autobuild_tester.py',
6-
data = [
7-
"//swift/xcode-autobuilder",
8-
'hello-autobuilder',
9-
] + glob(['hello-autobuilder/**/*'], exclude = ['**/*.actual']),
10-
args = [
11-
'$(location //swift/xcode-autobuilder)',
12-
'$(location hello-autobuilder)',
13-
]
1+
[
2+
py_test(
3+
name = test_dir + '-test',
4+
size = "small",
5+
srcs = ['autobuild_tester.py'],
6+
main = 'autobuild_tester.py',
7+
data = [
8+
"//swift/xcode-autobuilder",
9+
test_dir,
10+
] + glob([test_dir + '/**/*']),
11+
args = [
12+
'$(location //swift/xcode-autobuilder)',
13+
'$(location %s)' % test_dir,
14+
]
15+
)
16+
for test_dir in glob(["*"], exclude_directories=0, exclude=['*.*', '.*'])
17+
]
18+
19+
test_suite(
20+
name='tests'
1421
)

swift/xcode-autobuilder/tests/autobuild_tester.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
expected = test_dir / 'commands.expected'
1212
actual = pathlib.Path('commands.actual')
1313

14-
print(os.getcwd())
15-
1614
with open(actual, 'wb') as out:
1715
ret = subprocess.run([str(autobuilder), '-dry-run', '.'], capture_output=True, check=True, cwd=test_dir)
1816
for line in ret.stdout.splitlines():

swift/xcode-autobuilder/tests/hello-autobuilder/hello-autobuilder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

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

swift/xcode-autobuilder/tests/hello-workspace/Hello.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/usr/bin/xcodebuild build -workspace ./Hello.xcworkspace -scheme hello-workspace CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO

0 commit comments

Comments
 (0)