Skip to content

Commit

Permalink
Small fixes for Dialyzer's testsuites generation
Browse files Browse the repository at this point in the history
  • Loading branch information
aronisstav committed Feb 22, 2012
1 parent 520ddbc commit 7554fad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/dialyzer/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ release_tests_spec:
$(INSTALL_DATA) $(AUXILIARY_FILES) $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
cd $(RELSYSDIR);\
erl -make;\
erlc dialyzer_common.erl file_utils.erl;\
erl -noshell -run dialyzer_common create_all_suites -s erlang halt
11 changes: 7 additions & 4 deletions lib/dialyzer/test/dialyzer_common.erl
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,13 @@ get_suites(Dir) ->
end.

suffix(String, Suffix) ->
Index = string:rstr(String, Suffix),
case string:substr(String, Index) =:= Suffix of
true -> {yes, string:sub_string(String,1,Index-1)};
false -> no
case string:rstr(String, Suffix) of
0 -> no;
Index ->
case string:substr(String, Index) =:= Suffix of
true -> {yes, string:sub_string(String,1,Index-1)};
false -> no
end
end.

-spec create_suite(string()) -> 'ok'.
Expand Down

0 comments on commit 7554fad

Please sign in to comment.