Skip to content

Ensure test filtering is case insensitive #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mbed_os_tools/test/mbed_greentea_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create_filtered_test_list(ctest_test_list, test_by_names, skip_test, test_sp

if test_by_names:
filtered_ctest_test_list = {} # Subset of 'ctest_test_list'
test_list = test_by_names.split(',')
test_list = test_by_names.lower().split(',')
gt_logger.gt_log("test case filter (specified with -n option)")

for test_name in set(test_list):
Expand Down
8 changes: 8 additions & 0 deletions test/test/mbed_gt_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,13 @@ def test_create_filtered_test_list(self):
expected = set(['mbed-drivers-test-c_strings', 'mbed-drivers-test-generic_tests'])
self.assertEqual(set(test_list.keys()), expected)

# Should be case insensitive
test_list = mbed_greentea_cli.create_filtered_test_list(test_build.get_tests(),
'*-DRIVERS-*',
None,
test_spec=test_spec)
expected = set(['mbed-drivers-test-c_strings', 'mbed-drivers-test-generic_tests'])
self.assertEqual(set(test_list.keys()), expected)

if __name__ == '__main__':
unittest.main()