@@ -1272,23 +1272,23 @@ run_dir(Opts = #opts{logdir = LogDir,
12721272 true -> D end || D <- Dirs ],
12731273 reformat_result (catch do_run (tests (Dirs1 ), [], Opts1 , StartOpts ));
12741274
1275- {Dir = [Hd |_ ],undefined ,[]} when is_list (Dir ) and is_integer (Hd ) ->
1275+ {Dir = [Hd |_ ],undefined ,[]} when is_list (Dir ) andalso is_integer (Hd ) ->
12761276 reformat_result (catch do_run (tests (Dir ), [], Opts1 , StartOpts ));
12771277
1278- {Dir ,undefined ,[]} when is_atom (Dir ) and (Dir /= undefined ) ->
1278+ {Dir ,undefined ,[]} when is_atom (Dir ) andalso (Dir /= undefined ) ->
12791279 reformat_result (catch do_run (tests (atom_to_list (Dir )),
12801280 [], Opts1 , StartOpts ));
12811281
12821282 {undefined ,Suites = [Hd |_ ],[]} when not is_integer (Hd ) ->
12831283 Suites1 = [suite_to_test (S ) || S <- Suites ],
12841284 reformat_result (catch do_run (tests (Suites1 ), [], Opts1 , StartOpts ));
12851285
1286- {undefined ,Suite ,[]} when is_atom (Suite ) and
1286+ {undefined ,Suite ,[]} when is_atom (Suite ) andalso
12871287 (Suite /= undefined ) ->
12881288 {Dir ,Mod } = suite_to_test (Suite ),
12891289 reformat_result (catch do_run (tests (Dir , Mod ), [], Opts1 , StartOpts ));
12901290
1291- {undefined ,Suite ,GsAndCs } when is_atom (Suite ) and
1291+ {undefined ,Suite ,GsAndCs } when is_atom (Suite ) andalso
12921292 (Suite /= undefined ) ->
12931293 {Dir ,Mod } = suite_to_test (Suite ),
12941294 reformat_result (catch do_run (tests (Dir , Mod , GsAndCs ),
@@ -1298,8 +1298,8 @@ run_dir(Opts = #opts{logdir = LogDir,
12981298 exit ({error ,multiple_suites_and_cases });
12991299
13001300 {undefined ,Suite = [Hd |Tl ],GsAndCs } when is_integer (Hd ) ;
1301- (is_list (Hd ) and (Tl == [])) ;
1302- (is_atom (Hd ) and (Tl == [])) ->
1301+ (is_list (Hd ) andalso (Tl == [])) ;
1302+ (is_atom (Hd ) andalso (Tl == [])) ->
13031303 {Dir ,Mod } = suite_to_test (Suite ),
13041304 reformat_result (catch do_run (tests (Dir , Mod , GsAndCs ),
13051305 [], Opts1 , StartOpts ));
@@ -1311,18 +1311,18 @@ run_dir(Opts = #opts{logdir = LogDir,
13111311 exit ({error ,incorrect_start_options });
13121312
13131313 {Dir ,Suite ,GsAndCs } when is_integer (hd (Dir )) ;
1314- (is_atom (Dir ) and (Dir /= undefined )) ;
1315- ((length (Dir ) == 1 ) and is_atom (hd (Dir ))) ;
1316- ((length (Dir ) == 1 ) and is_list (hd (Dir ))) ->
1314+ (is_atom (Dir ) andalso (Dir /= undefined )) ;
1315+ ((length (Dir ) == 1 ) andalso is_atom (hd (Dir ))) ;
1316+ ((length (Dir ) == 1 ) andalso is_list (hd (Dir ))) ->
13171317 Dir1 = if is_atom (Dir ) -> atom_to_list (Dir );
13181318 true -> Dir end ,
13191319 if Suite == undefined ->
13201320 exit ({error ,incorrect_start_options });
13211321
13221322 is_integer (hd (Suite )) ;
1323- (is_atom (Suite ) and (Suite /= undefined )) ;
1324- ((length (Suite ) == 1 ) and is_atom (hd (Suite ))) ;
1325- ((length (Suite ) == 1 ) and is_list (hd (Suite ))) ->
1323+ (is_atom (Suite ) andalso (Suite /= undefined )) ;
1324+ ((length (Suite ) == 1 ) andalso is_atom (hd (Suite ))) ;
1325+ ((length (Suite ) == 1 ) andalso is_list (hd (Suite ))) ->
13261326 {Dir2 ,Mod } = suite_to_test (Dir1 , Suite ),
13271327 case GsAndCs of
13281328 [] ->
@@ -1608,20 +1608,20 @@ suite_to_test(Dir, Suite) when is_list(Suite) ->
16081608 {DirName ,list_to_atom (filename :rootname (File ))}
16091609 end .
16101610
1611- groups_and_cases (Gs , Cs ) when ((Gs == undefined ) or (Gs == [])) and
1612- ((Cs == undefined ) or (Cs == [])) ->
1611+ groups_and_cases (Gs , Cs ) when ((Gs == undefined ) orelse (Gs == [])) andalso
1612+ ((Cs == undefined ) orelse (Cs == [])) ->
16131613 [];
16141614groups_and_cases (Gs , Cs ) when Gs == undefined ; Gs == [] ->
1615- if (Cs == all ) or (Cs == [all ]) or (Cs == [" all" ]) -> all ;
1615+ if (Cs == all ) orelse (Cs == [all ]) orelse (Cs == [" all" ]) -> all ;
16161616 true -> [ensure_atom (C ) || C <- listify (Cs )]
16171617 end ;
16181618groups_and_cases (GOrGs , Cs ) when (is_atom (GOrGs ) orelse
16191619 (is_list (GOrGs ) andalso
16201620 (is_atom (hd (GOrGs )) orelse
16211621 (is_list (hd (GOrGs )) andalso
16221622 is_atom (hd (hd (GOrGs ))))))) ->
1623- if (Cs == undefined ) or (Cs == []) or
1624- (Cs == all ) or (Cs == [all ]) or (Cs == [" all" ]) ->
1623+ if (Cs == undefined ) orelse (Cs == []) orelse
1624+ (Cs == all ) orelse (Cs == [all ]) orelse (Cs == [" all" ]) ->
16251625 [{GOrGs ,all }];
16261626 true ->
16271627 [{GOrGs ,[ensure_atom (C ) || C <- listify (Cs )]}]
@@ -1630,7 +1630,7 @@ groups_and_cases(Gs, Cs) when is_integer(hd(hd(Gs))) ->
16301630 % % if list of strings, this comes from 'ct_run -group G1 G2 ...' and
16311631 % % we need to parse the strings
16321632 Gs1 =
1633- if (Gs == [all ]) or (Gs == [" all" ]) ->
1633+ if (Gs == [all ]) orelse (Gs == [" all" ]) ->
16341634 all ;
16351635 true ->
16361636 lists :map (fun (G ) ->
@@ -2358,7 +2358,7 @@ start_cover(Opts=#opts{coverspec=CovData,cover_stop=CovStop},LogDir) ->
23582358 [TsCoverInfo ]),
23592359
23602360 % % start cover on specified nodes
2361- if (CovNodes /= []) and (CovNodes /= undefined ) ->
2361+ if (CovNodes /= []) andalso (CovNodes /= undefined ) ->
23622362 ct_logs :log (" COVER INFO" ,
23632363 " Nodes included in cover "
23642364 " session: ~tw " ,
0 commit comments