Skip to content

Commit 78d3307

Browse files
committed
Test.py: removed now unused functions
1 parent ec510c3 commit 78d3307

1 file changed

Lines changed: 1 addition & 66 deletions

File tree

test/test.py

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,6 @@ def print_skipped(tests):
5050
print pretty.WARNING("* Skipping " + test.name_)
5151
print " Reason: {0:40}".format(test.skip_reason_)
5252

53-
def valid_tests(subfolder=None):
54-
"""Returns a list of all the valid integration tests in */integration/*"""
55-
if "integration" in args.skip:
56-
return []
57-
58-
skip_json = json.loads(open("skipped_tests.json").read())
59-
for skip in skip_json:
60-
print_skipped(skip["name"], skip["reason"])
61-
args.skip.append(skip["name"])
62-
63-
print
64-
65-
valid_tests = [ x for x in validate_all.valid_tests() if not x in args.skip ]
66-
67-
if subfolder:
68-
return [x for x in valid_tests if x.split('/')[0] == subfolder]
69-
70-
if args.tests:
71-
return [x for x in valid_tests if x.split("/")[-1] in args.tests]
72-
73-
return valid_tests
74-
7553

7654
class Test:
7755
""" A class to start a test as a subprocess and pretty-print status """
@@ -251,49 +229,6 @@ def examples_working():
251229
return fail_count
252230

253231

254-
def main():
255-
global test_count
256-
257-
# Warned about skipped tests
258-
# @note : doesn't warn if you use '-t a b c ...' to run specific tests
259-
if args.skip:
260-
for skip in args.skip:
261-
print_skipped(skip, "marked skipped on command line")
262-
263-
264-
test_categories = ["integration", "examples", "unit", "stress"]
265-
if "integration" not in args.tests:
266-
test_folders = ["fs", "hw", "kernel", "net", "platform", "stl", "util"]
267-
else:
268-
test_folders = []
269-
tests_combined = test_categories + test_folders
270-
if args.tests:
271-
test_categories = [x for x in tests_combined if x in args.tests ]
272-
if args.skip:
273-
test_categories = [x for x in tests_combined if not x in args.skip]
274-
275-
276-
integration = integration_tests() if "integration" in test_categories else 0
277-
stress = stress_test() if "stress" in test_categories else 0
278-
unit = unit_tests() if "unit" in test_categories else 0
279-
examples = examples_working() if "examples" in test_categories else 0
280-
folders = integration_tests(subfolder=test_categories[0]) if test_categories[0] in test_folders else 0
281-
282-
status = max(integration, stress, unit, examples, folders)
283-
284-
if (not test_count):
285-
print "No tests selected"
286-
exit(0)
287-
288-
if (status == 0):
289-
print pretty.SUCCESS(str(test_count - status) + " / " + str(test_count)
290-
+ " tests passed, exiting with code 0")
291-
else:
292-
print pretty.FAIL(str(status) + " / " + str(test_count) + " tests failed ")
293-
294-
sys.exit(status)
295-
296-
297232
def integration_tests(tests):
298233
""" Function that runs the tests that are passed to it.
299234
Filters out any invalid tests before running
@@ -411,4 +346,4 @@ def main():
411346

412347

413348
if __name__ == '__main__':
414-
main2()
349+
main()

0 commit comments

Comments
 (0)