diff options
author | Björn Gustavsson <[email protected]> | 2011-11-28 14:38:19 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-11-28 14:38:19 +0100 |
commit | db76ac1fad6b44130103179944e934c13a365e5f (patch) | |
tree | 98fa76e7bf1dcd20bbdd64629ba7b3453fba98b5 | |
parent | 3f499acce4fcfa3d93ca4c1ea6e9b86aef44d74a (diff) | |
parent | 803f8ebacd1665fcd7f0f826a5f537bdfd9e350f (diff) | |
download | otp-db76ac1fad6b44130103179944e934c13a365e5f.tar.gz otp-db76ac1fad6b44130103179944e934c13a365e5f.tar.bz2 otp-db76ac1fad6b44130103179944e934c13a365e5f.zip |
Merge branch 'bjorn/fix-failing-tests'
* bjorn/fix-failing-tests:
erlc_SUITE:arg_overflow/1: Lower number of options for MacOS X Lion
tar_SUITE: Don't do symlink tests on Windows
erlc_SUITE: Fix failing compile_mib/1 test case
-rw-r--r-- | erts/test/erlc_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/stdlib/test/tar_SUITE.erl | 27 |
2 files changed, 33 insertions, 3 deletions
diff --git a/erts/test/erlc_SUITE.erl b/erts/test/erlc_SUITE.erl index a9e28672e3..6c0d662126 100644 --- a/erts/test/erlc_SUITE.erl +++ b/erts/test/erlc_SUITE.erl @@ -154,7 +154,8 @@ compile_mib(Config) when is_list(Config) -> ?line BadFile = filename:join(SrcDir, "BAD-MIB.mib"), ?line run(Config, Cmd, BadFile, "", - ["Error: syntax error before: mibs\$", "compilation_failed_ERROR_"]), + ["BAD-MIB.mib: 1: syntax error before: mibs\$", + "compilation_failed_ERROR_"]), %% Make sure that no -I option works. @@ -237,6 +238,12 @@ num_d_options() -> %% of arguments is 16383. %% See: http://www.in-ulm.de/~mascheck/various/argmax/ 5440; + {{unix,darwin},{Major,_,_}} when Major >= 11 -> + %% "getconf ARG_MAX" still reports 262144 (as in previous + %% version of MacOS X), but the useful space seem to have + %% shrunk significantly (or possibly the number of arguments). + %% 7673 + 7500; {_,_} -> 12000 end. diff --git a/lib/stdlib/test/tar_SUITE.erl b/lib/stdlib/test/tar_SUITE.erl index 9ad3936928..65ccdcb7a8 100644 --- a/lib/stdlib/test/tar_SUITE.erl +++ b/lib/stdlib/test/tar_SUITE.erl @@ -533,7 +533,7 @@ symlinks(Config) when is_list(Config) -> ?line ok = file:make_dir(Dir), ?line ABadSymlink = filename:join(Dir, "bad_symlink"), ?line PointsTo = "/a/definitely/non_existing/path", - ?line Res = case file:make_symlink("/a/definitely/non_existing/path", ABadSymlink) of + ?line Res = case make_symlink("/a/definitely/non_existing/path", ABadSymlink) of {error, enotsup} -> {skip, "Symbolic links not supported on this platform"}; ok -> @@ -544,7 +544,30 @@ symlinks(Config) when is_list(Config) -> %% Clean up. ?line delete_files([Dir]), Res. - + +make_symlink(Path, Link) -> + case os:type() of + {win32,_} -> + %% Symlinks on Windows have two problems: + %% 1) file:read_link_info/1 cannot read out the target + %% of the symlink if the target does not exist. + %% That is possible (but not easy) to fix in the + %% efile driver. + %% + %% 2) Symlinks to files and directories are different + %% creatures. If the target is not existing, the + %% symlink will be created to be of the file-pointing + %% type. That can be partially worked around in erl_tar + %% by creating all symlinks when the end of the tar + %% file has been reached. + %% + %% But for now, pretend that there are no symlinks on + %% Windows. + {error, enotsup}; + _ -> + file:make_symlink(Path, Link) + end. + symlinks(Dir, BadSymlink, PointsTo) -> ?line Tar = filename:join(Dir, "symlink.tar"), ?line DerefTar = filename:join(Dir, "dereference.tar"), |