Skip to content

Commit 125e117

Browse files
committed
Glob all tests so that anything named Test*.swift in the TestFoundation directory is part of the unit test build phase
1 parent a9ee4b2 commit 125e117

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

build.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -350,19 +350,7 @@
350350
# TODO: Probably this should be another 'product', but for now it's simply a phase
351351
foundation_tests = SwiftExecutable('TestFoundation', [
352352
'TestFoundation/main.swift',
353-
'TestFoundation/TestNSArray.swift',
354-
'TestFoundation/TestNSIndexSet.swift',
355-
'TestFoundation/TestNSDictionary.swift',
356-
'TestFoundation/TestNSNumber.swift',
357-
'TestFoundation/TestNSPropertyList.swift',
358-
'TestFoundation/TestNSRange.swift',
359-
'TestFoundation/TestNSSet.swift',
360-
'TestFoundation/TestNSString.swift',
361-
'TestFoundation/TestNSURL.swift',
362-
'TestFoundation/TestNSFileManager.swift',
363-
'TestFoundation/TestNSCharacterSet.swift',
364-
'TestFoundation/TestNSXMLParser.swift',
365-
])
353+
] + glob.glob('./TestFoundation/Test*.swift')) # all TestSomething.swift are considered sources to the test project in the TestFoundation directory
366354

367355
foundation_tests.add_dependency(foundation_tests_resources)
368356
foundation.add_phase(foundation_tests_resources)

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import sys
1313
import os
1414
import argparse
1515
import json
16+
import glob
1617

1718
from lib.config import Configuration
1819

0 commit comments

Comments
 (0)