@@ -1274,23 +1274,23 @@ run_dir(Opts = #opts{logdir = LogDir,
12741274 true -> D end || D <- Dirs ],
12751275 reformat_result (catch do_run (tests (Dirs1 ), [], Opts1 , StartOpts ));
12761276
1277- {Dir = [Hd |_ ],undefined ,[]} when is_list (Dir ) and is_integer (Hd ) ->
1277+ {Dir = [Hd |_ ],undefined ,[]} when is_list (Dir ) andalso is_integer (Hd ) ->
12781278 reformat_result (catch do_run (tests (Dir ), [], Opts1 , StartOpts ));
12791279
1280- {Dir ,undefined ,[]} when is_atom (Dir ) and (Dir /= undefined ) ->
1280+ {Dir ,undefined ,[]} when is_atom (Dir ) andalso (Dir /= undefined ) ->
12811281 reformat_result (catch do_run (tests (atom_to_list (Dir )),
12821282 [], Opts1 , StartOpts ));
12831283
12841284 {undefined ,Suites = [Hd |_ ],[]} when not is_integer (Hd ) ->
12851285 Suites1 = [suite_to_test (S ) || S <- Suites ],
12861286 reformat_result (catch do_run (tests (Suites1 ), [], Opts1 , StartOpts ));
12871287
1288- {undefined ,Suite ,[]} when is_atom (Suite ) and
1288+ {undefined ,Suite ,[]} when is_atom (Suite ) andalso
12891289 (Suite /= undefined ) ->
12901290 {Dir ,Mod } = suite_to_test (Suite ),
12911291 reformat_result (catch do_run (tests (Dir , Mod ), [], Opts1 , StartOpts ));
12921292
1293- {undefined ,Suite ,GsAndCs } when is_atom (Suite ) and
1293+ {undefined ,Suite ,GsAndCs } when is_atom (Suite ) andalso
12941294 (Suite /= undefined ) ->
12951295 {Dir ,Mod } = suite_to_test (Suite ),
12961296 reformat_result (catch do_run (tests (Dir , Mod , GsAndCs ),
@@ -1300,8 +1300,8 @@ run_dir(Opts = #opts{logdir = LogDir,
13001300 exit ({error ,multiple_suites_and_cases });
13011301
13021302 {undefined ,Suite = [Hd |Tl ],GsAndCs } when is_integer (Hd ) ;
1303- (is_list (Hd ) and (Tl == [])) ;
1304- (is_atom (Hd ) and (Tl == [])) ->
1303+ (is_list (Hd ) andalso (Tl == [])) ;
1304+ (is_atom (Hd ) andalso (Tl == [])) ->
13051305 {Dir ,Mod } = suite_to_test (Suite ),
13061306 reformat_result (catch do_run (tests (Dir , Mod , GsAndCs ),
13071307 [], Opts1 , StartOpts ));
@@ -1313,18 +1313,18 @@ run_dir(Opts = #opts{logdir = LogDir,
13131313 exit ({error ,incorrect_start_options });
13141314
13151315 {Dir ,Suite ,GsAndCs } when is_integer (hd (Dir )) ;
1316- (is_atom (Dir ) and (Dir /= undefined )) ;
1317- ((length (Dir ) == 1 ) and is_atom (hd (Dir ))) ;
1318- ((length (Dir ) == 1 ) and is_list (hd (Dir ))) ->
1316+ (is_atom (Dir ) andalso (Dir /= undefined )) ;
1317+ ((length (Dir ) == 1 ) andalso is_atom (hd (Dir ))) ;
1318+ ((length (Dir ) == 1 ) andalso is_list (hd (Dir ))) ->
13191319 Dir1 = if is_atom (Dir ) -> atom_to_list (Dir );
13201320 true -> Dir end ,
13211321 if Suite == undefined ->
13221322 exit ({error ,incorrect_start_options });
13231323
13241324 is_integer (hd (Suite )) ;
1325- (is_atom (Suite ) and (Suite /= undefined )) ;
1326- ((length (Suite ) == 1 ) and is_atom (hd (Suite ))) ;
1327- ((length (Suite ) == 1 ) and is_list (hd (Suite ))) ->
1325+ (is_atom (Suite ) andalso (Suite /= undefined )) ;
1326+ ((length (Suite ) == 1 ) andalso is_atom (hd (Suite ))) ;
1327+ ((length (Suite ) == 1 ) andalso is_list (hd (Suite ))) ->
13281328 {Dir2 ,Mod } = suite_to_test (Dir1 , Suite ),
13291329 case GsAndCs of
13301330 [] ->
@@ -1610,20 +1610,20 @@ suite_to_test(Dir, Suite) when is_list(Suite) ->
16101610 {DirName ,list_to_atom (filename :rootname (File ))}
16111611 end .
16121612
1613- groups_and_cases (Gs , Cs ) when ((Gs == undefined ) or (Gs == [])) and
1614- ((Cs == undefined ) or (Cs == [])) ->
1613+ groups_and_cases (Gs , Cs ) when ((Gs == undefined ) orelse (Gs == [])) andalso
1614+ ((Cs == undefined ) orelse (Cs == [])) ->
16151615 [];
16161616groups_and_cases (Gs , Cs ) when Gs == undefined ; Gs == [] ->
1617- if (Cs == all ) or (Cs == [all ]) or (Cs == [" all" ]) -> all ;
1617+ if (Cs == all ) orelse (Cs == [all ]) orelse (Cs == [" all" ]) -> all ;
16181618 true -> [ensure_atom (C ) || C <- listify (Cs )]
16191619 end ;
16201620groups_and_cases (GOrGs , Cs ) when (is_atom (GOrGs ) orelse
16211621 (is_list (GOrGs ) andalso
16221622 (is_atom (hd (GOrGs )) orelse
16231623 (is_list (hd (GOrGs )) andalso
16241624 is_atom (hd (hd (GOrGs ))))))) ->
1625- if (Cs == undefined ) or (Cs == []) or
1626- (Cs == all ) or (Cs == [all ]) or (Cs == [" all" ]) ->
1625+ if (Cs == undefined ) orelse (Cs == []) orelse
1626+ (Cs == all ) orelse (Cs == [all ]) orelse (Cs == [" all" ]) ->
16271627 [{GOrGs ,all }];
16281628 true ->
16291629 [{GOrGs ,[ensure_atom (C ) || C <- listify (Cs )]}]
@@ -1632,7 +1632,7 @@ groups_and_cases(Gs, Cs) when is_integer(hd(hd(Gs))) ->
16321632 % % if list of strings, this comes from 'ct_run -group G1 G2 ...' and
16331633 % % we need to parse the strings
16341634 Gs1 =
1635- if (Gs == [all ]) or (Gs == [" all" ]) ->
1635+ if (Gs == [all ]) orelse (Gs == [" all" ]) ->
16361636 all ;
16371637 true ->
16381638 lists :map (fun (G ) ->
@@ -2360,7 +2360,7 @@ start_cover(Opts=#opts{coverspec=CovData,cover_stop=CovStop},LogDir) ->
23602360 [TsCoverInfo ]),
23612361
23622362 % % start cover on specified nodes
2363- if (CovNodes /= []) and (CovNodes /= undefined ) ->
2363+ if (CovNodes /= []) andalso (CovNodes /= undefined ) ->
23642364 ct_logs :log (" COVER INFO" ,
23652365 " Nodes included in cover "
23662366 " session: ~tw " ,
0 commit comments