aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2012-03-26 13:37:33 +0200
committerPeter Andersson <[email protected]>2012-03-26 13:37:33 +0200
commit688386c48dc55b38da1ce55e2db236f6da86cdde (patch)
tree4c17fc3359ab13ee8437083706f65150d93bcf0e /lib
parent2e39538b3ef1b27abd8053b22af890fa3999d7b6 (diff)
parentef60b9f4da7156106c688c9f291db4eeecc264be (diff)
downloadotp-688386c48dc55b38da1ce55e2db236f6da86cdde.tar.gz
otp-688386c48dc55b38da1ce55e2db236f6da86cdde.tar.bz2
otp-688386c48dc55b38da1ce55e2db236f6da86cdde.zip
Merge remote branch 'origin/peppe/common_test/otp-9633' into maint
* origin/peppe/common_test/otp-9633: Repair is_release_available/1
Diffstat (limited to 'lib')
-rw-r--r--lib/test_server/src/test_server_node.erl23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/test_server/src/test_server_node.erl b/lib/test_server/src/test_server_node.erl
index 1fd40d1dd9..2cc4facc32 100644
--- a/lib/test_server/src/test_server_node.erl
+++ b/lib/test_server/src/test_server_node.erl
@@ -943,12 +943,23 @@ find_rel_suse_1(Rel, RootWc) ->
end.
find_rel_suse_2(Rel, RootWc) ->
- Wc = RootWc ++ "_" ++ Rel,
- case filelib:wildcard(Wc) of
- [] ->
- [];
- [R|_] ->
- [filename:join([R,"bin","erl"])]
+ RelDir = filename:dirname(RootWc),
+ Pat = filename:basename(RootWc ++ "_" ++ Rel) ++ ".*",
+ case file:list_dir(RelDir) of
+ {ok,Dirs} ->
+ case lists:filter(fun(Dir) ->
+ case re:run(Dir, Pat) of
+ nomatch -> false;
+ _ -> true
+ end
+ end, Dirs) of
+ [] ->
+ [];
+ [R|_] ->
+ [filename:join([RelDir,R,"bin","erl"])]
+ end;
+ _ ->
+ []
end.
%% suse_release() -> VersionString | none.