aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-12-09 11:54:10 +0100
committerStavros Aronis <[email protected]>2012-02-22 13:04:27 +0100
commit7554fad452171ec3dc0873ffdd09a24f6531b347 (patch)
treeb298669d172117915076acbadf47ee8da06d4333 /lib
parent520ddbc83ec87bcec262680bd915184182e3998e (diff)
downloadotp-7554fad452171ec3dc0873ffdd09a24f6531b347.tar.gz
otp-7554fad452171ec3dc0873ffdd09a24f6531b347.tar.bz2
otp-7554fad452171ec3dc0873ffdd09a24f6531b347.zip
Small fixes for Dialyzer's testsuites generation
Diffstat (limited to 'lib')
-rw-r--r--lib/dialyzer/test/Makefile2
-rw-r--r--lib/dialyzer/test/dialyzer_common.erl11
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/dialyzer/test/Makefile b/lib/dialyzer/test/Makefile
index 47deb17f1d..6a1abce943 100644
--- a/lib/dialyzer/test/Makefile
+++ b/lib/dialyzer/test/Makefile
@@ -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
diff --git a/lib/dialyzer/test/dialyzer_common.erl b/lib/dialyzer/test/dialyzer_common.erl
index 51766a4604..d2b1026c06 100644
--- a/lib/dialyzer/test/dialyzer_common.erl
+++ b/lib/dialyzer/test/dialyzer_common.erl
@@ -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'.