File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,17 @@ def srcincluded(f):
3030 fl = str (f ).lower ()
3131 rv = srcsupported (f )
3232 rv = rv and f .srcnode ().isfile ()
33- if env_test .get ('tests' ) is not None :
34- rv = rv and any ( t .lower () in fl
35- for t in Split ( env_test [ 'tests' ]) )
33+ if env_test .get ('tests' ):
34+ tpatterns = Split ( env_test [ 'tests' ] .lower (). replace ( ',' , ' ' ))
35+ rv = rv and any ( tp in fl for tp in tpatterns )
3636 return rv
3737
3838# alltests -- the unit test driver source files
39- test_sources = filter (srcincluded , GlobSources ('Test*.hpp' ))
39+ test_sources = [f for f in GlobSources ('Test*.hpp' ) if srcincluded (f )]
40+ if not test_sources :
41+ ts = env_test .get ('tests' , '' )
42+ print ("Cannot find any test matching 'tests={}'." .format (ts ))
43+ Exit (1 )
4044
4145# Define the DIFFPYTESTSDIRPATH macro required for test_helpers.cpp
4246thisdir = Dir ('.' ).srcnode ().abspath
You can’t perform that action at this time.
0 commit comments