From 4bcf607bf9ce573790cd1a98c612fd894f938d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Fri, 15 Jan 2010 15:00:22 +0100 Subject: Include test_servers's include files in the bootstrap To make it possible to use -include_lib to include the include files for test_server, those include files must be included in the bootstrap directory. --- Makefile.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile.in b/Makefile.in index 107bf80bb5..a3020053a4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -441,6 +441,8 @@ fourth_bootstrap_copy: if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx ; fi if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/ebin ; fi if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/wx/include ; fi + if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server ; fi + if test ! -d $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server/include ; then mkdir $(BOOTSTRAP_ROOT)/bootstrap/lib/test_server/include ; fi for x in lib/ic/ebin/*.beam; do \ BN=`basename $$x`; \ TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/ic/ebin/$$BN; \ @@ -506,6 +508,16 @@ fourth_bootstrap_copy: cp $$x $$TF; \ true; \ done + for x in lib/test_server/include/*.hrl; do \ + BN=`basename $$x`; \ + TF=$(BOOTSTRAP_ROOT)/bootstrap/lib/test_server/include/$$BN; \ + test -f $$TF && \ + test '!' -z "`find $$x -newer $$TF -print`" && \ + cp $$x $$TF; \ + test '!' -f $$TF && \ + cp $$x $$TF; \ + true; \ + done # cp lib/syntax_tools/ebin/*.beam $(BOOTSTRAP_ROOT)/bootstrap/lib/syntax_tools/ebin -- cgit v1.2.3 From f22949680eb728659476b268f487d2a50019357b Mon Sep 17 00:00:00 2001 From: Fred T-H Date: Thu, 24 Dec 2009 14:00:04 -0500 Subject: make it possible to include ct.hrl using include_lib It is major annoyance that ct.hrl cannot be included using "-include_lib". The problem is that ct.hrl in turn includes the test_server include files using "-include". Fix it by using "-include_lib" in ct.hrl. --- lib/common_test/doc/src/example_chapter.xml | 6 +++--- lib/common_test/include/ct.hrl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/common_test/doc/src/example_chapter.xml b/lib/common_test/doc/src/example_chapter.xml index 028cbf7c8d..8d73b8ce27 100644 --- a/lib/common_test/doc/src/example_chapter.xml +++ b/lib/common_test/doc/src/example_chapter.xml @@ -38,7 +38,7 @@ -module(db_data_type_SUITE). --include("ct.hrl"). +-include_lib("common_test/include/ct.hrl"). %% Test server callbacks -export([suite/0, all/0, @@ -186,7 +186,7 @@ insert_and_lookup(Key, Value, Config) -> %% Note: This directive should only be used in test suites. -compile(export_all). --include("ct.hrl"). +-include_lib("common_test/include/ct.hrl"). %%-------------------------------------------------------------------- %% COMMON TEST CALLBACK FUNCTIONS @@ -394,7 +394,7 @@ my_test_case(_Config) -> -compile(export_all). --include("ct.hrl"). +-include_lib("common_test/include/ct.hrl"). %%-------------------------------------------------------------------- %% Function: suite() -> Info diff --git a/lib/common_test/include/ct.hrl b/lib/common_test/include/ct.hrl index ad3b3374c4..663d08e0a7 100644 --- a/lib/common_test/include/ct.hrl +++ b/lib/common_test/include/ct.hrl @@ -17,6 +17,6 @@ %% %CopyrightEnd% %% --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -compile({parse_transform,ct_line}). -- cgit v1.2.3