@@ -2110,11 +2110,22 @@ def find_tests(base_dir, target_name, toolchain_name, icetea, greentea, app_conf
2110
2110
d = join (directory , test_group_directory , test_case_directory )
2111
2111
if not isdir (d ) or ignoreset .is_ignored (d ):
2112
2112
continue
2113
- if 'device' == subdir :
2114
- for test_dir in os .listdir (d ):
2115
- test_dir_path = join (d , test_dir )
2116
- test_name = test_path_to_name (test_dir_path , base_dir )
2117
- tests [(test_name , directory , subdir , test_dir )] = [test_dir_path ]
2113
+ special_dirs = ['host_tests' , 'COMMON' ]
2114
+ if test_group_directory not in special_dirs and test_case_directory not in special_dirs :
2115
+ test_name = test_path_to_name (d , base_dir )
2116
+ tests [(test_name , directory , test_group_directory , test_case_directory )] = [d ]
2117
+ if test_case_directory == 'COMMON' :
2118
+ def predicate (base_pred , group_pred , name_base_group_case ):
2119
+ (name , base , group , case ) = name_base_group_case
2120
+ return base == base_pred and group == group_pred
2121
+
2122
+ commons .append ((functools .partial (predicate , directory , test_group_directory ), d ))
2123
+ if test_group_directory == 'COMMON' :
2124
+ def predicate (base_pred , name_base_group_case ):
2125
+ (name , base , group , case ) = name_base_group_case
2126
+ return base == base_pred
2127
+
2128
+ commons .append ((functools .partial (predicate , directory ), grp_dir ))
2118
2129
2119
2130
if icetea :
2120
2131
dirs = [d for d in base_resources .ignored_dirs if basename (d ) == 'TEST_APPS' ]
@@ -2124,6 +2135,12 @@ def find_tests(base_dir, target_name, toolchain_name, icetea, greentea, app_conf
2124
2135
for subdir in os .listdir (directory ):
2125
2136
d = join (directory , subdir )
2126
2137
if not isdir (d ):
2138
+ continue
2139
+ if 'device' == subdir :
2140
+ for test_dir in os .listdir (d ):
2141
+ test_dir_path = join (d , test_dir )
2142
+ test_name = test_path_to_name (test_dir_path , base_dir )
2143
+ tests [(test_name , directory , subdir , test_dir )] = [test_dir_path ]
2127
2144
2128
2145
# Apply common directories
2129
2146
for pred , path in commons :
0 commit comments