From d1242b0aea1078c91c4b35e07ab3b16b19248a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 14 Sep 2011 12:10:46 +0200 Subject: Remove lib/orber/include/* from the primary bootstrap The include files for orber are included in the primary bootstrap, probably for historical reasons. They are not needed there, because no applications compiled in the secondary bootstrap need them. Therefore, install the lib/orber/include/* in the bootstrap at the end of the second bootstrap stage. --- lib/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile index 7f4c309da9..be86696ca3 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -83,7 +83,7 @@ endif ifdef BOOTSTRAP SUB_DIRECTORIES = \ - kernel stdlib compiler orber/include + kernel stdlib compiler else ifdef SECONDARY_BOOTSTRAP SUB_DIRECTORIES = hipe parsetools asn1/src -- cgit v1.2.3 From 7186473e4e3c87f2e0a02339d146da331cf8b01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 14 Sep 2011 16:35:27 +0200 Subject: Remove unused lib/orber/include/Makefile --- lib/orber/include/Makefile | 66 ---------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 lib/orber/include/Makefile (limited to 'lib') diff --git a/lib/orber/include/Makefile b/lib/orber/include/Makefile deleted file mode 100644 index 219b7085e6..0000000000 --- a/lib/orber/include/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 1998-2009. All Rights Reserved. -# -# The contents of this file are subject to the Erlang Public License, -# Version 1.1, (the "License"); you may not use this file except in -# compliance with the License. You should have received a copy of the -# Erlang Public License along with this software. If not, it can be -# retrieved online at http://www.erlang.org/. -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -# the License for the specific language governing rights and limitations -# under the License. -# -# %CopyrightEnd% -# -# -include $(ERL_TOP)/make/target.mk - -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include ../vsn.mk -VSN=$(ORBER_VSN) - -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/orber-$(VSN) - -# ---------------------------------------------------- -# Target Specs -# ---------------------------------------------------- - -EXTERNAL_HRL_FILES= ../include/corba.hrl \ - ../include/ifr_types.hrl \ - ../include/orber_pi.hrl - -# ---------------------------------------------------- -# FLAGS -# ---------------------------------------------------- - -# ---------------------------------------------------- -# Targets -# ---------------------------------------------------- -debug opt clean docs: - - -# ---------------------------------------------------- -# Release Target -# ---------------------------------------------------- -include $(ERL_TOP)/make/otp_release_targets.mk - - -release_spec: opt - $(INSTALL_DIR) $(RELSYSDIR)/include - $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) $(RELSYSDIR)/include - - -release_docs_spec: - - -- cgit v1.2.3 From bb3f5af90f947d63e36cc9922acb9958acb0ab49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 14 Sep 2011 16:13:15 +0200 Subject: Merge the fourth bootstrap stage into the third bootstrap stage The sasl application used to have snmp MIBs, thus requiring the snmp and sasl applications to be built in separate bootstrap stage. Since the MIBs in sasl have been moved to the otp_mibs application, the third and fourth bootstrap stages can be merged. --- lib/Makefile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile index be86696ca3..98d746925f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -89,13 +89,9 @@ else SUB_DIRECTORIES = hipe parsetools asn1/src else ifdef TERTIARY_BOOTSTRAP - SUB_DIRECTORIES = snmp - else - ifdef FOURTH_BOOTSTRAP - SUB_DIRECTORIES = sasl jinterface ic syntax_tools - else # Not bootstrap build - SUB_DIRECTORIES = $(ERTS_SUB_DIRECTORIES) $(OTHER_SUB_DIRECTORIES) - endif + SUB_DIRECTORIES = snmp sasl jinterface ic syntax_tools + else # Not bootstrap build + SUB_DIRECTORIES = $(ERTS_SUB_DIRECTORIES) $(OTHER_SUB_DIRECTORIES) endif endif endif -- cgit v1.2.3 From 23d16bd14c0d324d7a2c3895efc68b4f069d7efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 16 Sep 2011 10:46:01 +0200 Subject: tar_SUITE: Work around limited pathname length on Windows Ever since the test suites were converted to the common_test convention, the tests for long names started to fail on Windows. The reason is that those test cases depend on the current working directory, and that the current working directory in common_test test cases is usually set to a directory with a longer pathname than in test_server test suites. Since neither Erlang/OTP nor common_test provides a portable way to create a temporary directory with a short name, we will have to abuse priv_dir by going upwards from it. For further information, see the comment in run_in_short_tempdir/2. --- lib/stdlib/test/tar_SUITE.erl | 60 +++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 13 deletions(-) (limited to 'lib') diff --git a/lib/stdlib/test/tar_SUITE.erl b/lib/stdlib/test/tar_SUITE.erl index 48f58cd05d..9ad3936928 100644 --- a/lib/stdlib/test/tar_SUITE.erl +++ b/lib/stdlib/test/tar_SUITE.erl @@ -283,17 +283,16 @@ long_names(doc) -> long_names(Config) when is_list(Config) -> ?line DataDir = ?config(data_dir, Config), ?line Long = filename:join(DataDir, "long_names.tar"), + run_in_short_tempdir(Config, + fun() -> do_long_names(Long) end). +do_long_names(Long) -> %% Try table/2 and extract/2. ?line case erl_tar:table(Long, [verbose]) of {ok,List} when is_list(List) -> ?line io:format("~p\n", [List]) end, - - %% To avoid getting too long paths for Windows to handle, extract into - %% the current directory (which is the test_server directory). Its path - %% is quite a bit shorter than the path to priv_dir. ?line {ok,Cwd} = file:get_cwd(), ?line ok = erl_tar:extract(Long), ?line Base = filename:join([Cwd, "original_software", "written_by", @@ -312,17 +311,16 @@ long_names(Config) when is_list(Config) -> ?line "Here"++_ = binary_to_list(First), ?line "And"++_ = binary_to_list(Second), - %% Clean up. - ?line delete_files([filename:join(Cwd, "original_software"),EmptyDir]), - ok. create_long_names(doc) -> ["Creates a tar file from a deep directory structure (filenames are ", "longer than 100 characters)."]; create_long_names(Config) when is_list(Config) -> - ?line PrivDir = ?config(priv_dir, Config), - ?line ok = file:set_cwd(PrivDir), + run_in_short_tempdir(Config, fun create_long_names/0). + +create_long_names() -> + ?line {ok,Dir} = file:get_cwd(), Dirs = ["aslfjkshjkhliuf", "asdhjfehnbfsky", "sahajfskdfhsz", @@ -334,7 +332,7 @@ create_long_names(Config) when is_list(Config) -> ?line AFile = filename:join(DeepDir, "a_file"), ?line Hello = "hello, world\n", ?line ok = file:write_file(AFile, Hello), - ?line TarName = filename:join(PrivDir, "my_tar_with_long_names.tar"), + ?line TarName = filename:join(Dir, "my_tar_with_long_names.tar"), ?line ok = erl_tar:create(TarName, [AFile]), %% Print contents. @@ -347,9 +345,6 @@ create_long_names(Config) when is_list(Config) -> ?line {ok, Bin} = file:read_file(filename:join(ExtractDir, AFile)), ?line Hello = binary_to_list(Bin), - %% Clean up. - ?line delete_files([ExtractDir,TarName,hd(Dirs)]), - ok. make_dirs([Dir|Rest], []) -> @@ -734,3 +729,42 @@ delete_files([Item|Rest]) -> end, delete_files(Rest). +%% Move to a temporary directory with as short name as possible and +%% execute Fun. Remove the directory and any files in it afterwards. +%% This is necessary because pathnames on Windows may be limited to +%% 260 characters. +run_in_short_tempdir(Config, Fun) -> + {ok,Cwd} = file:get_cwd(), + PrivDir0 = ?config(priv_dir, Config), + + %% Normalize name to make sure that there is no slash at the end. + PrivDir = filename:absname(PrivDir0), + + %% We need a base directory with a much shorter pathname than + %% priv_dir. We KNOW that priv_dir is located four levels below + %% the directory that common_test puts the ct_run.* directories + %% in. That fact is not documented, but an usually reliable source + %% assured me that the directory structure is unlikely to change + %% in future versions of common_test because of backward + %% compatibility (tools developed by users of common_test depend + %% on the current directory layout). + Base = lists:foldl(fun(_, D) -> + filename:dirname(D) + end, PrivDir, [1,2,3,4]), + + Dir = make_temp_dir(Base, 0), + ok = file:set_cwd(Dir), + io:format("Running test in ~s\n", [Dir]), + try + Fun() + after + file:set_cwd(Cwd), + delete_files([Dir]) + end. + +make_temp_dir(Base, I) -> + Name = filename:join(Base, integer_to_list(I, 36)), + case file:make_dir(Name) of + ok -> Name; + {error,eexist} -> make_temp_dir(Base, I+1) + end. -- cgit v1.2.3