From 7cc68fb4820f68e21867bb8f16172e8f72d04edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sun, 17 Apr 2016 08:03:09 +0200 Subject: int_SUITE: Fix interpretable/1 on cross-compiled platforms c7e82c6b406b teached the debugger to use the 'source' key in Mod:module_info/1 to help locate the source code corresponding to a BEAM file. The new test that was added at the same time will fail if the test suites were cross-compiled on another computer (i.e., the 'source' key would not point to the source file on the target computer). Avoid the problem by letting int_SUITE:init_per_suite/1 compile the BEAM files. That will ensure that 'source' keys points to the actual source file. --- lib/debugger/test/int_SUITE.erl | 8 ++++++ lib/debugger/test/int_SUITE_data/Emakefile | 1 + lib/debugger/test/int_SUITE_data/Makefile.src | 40 --------------------------- 3 files changed, 9 insertions(+), 40 deletions(-) create mode 100644 lib/debugger/test/int_SUITE_data/Emakefile delete mode 100644 lib/debugger/test/int_SUITE_data/Makefile.src (limited to 'lib/debugger') diff --git a/lib/debugger/test/int_SUITE.erl b/lib/debugger/test/int_SUITE.erl index af8f5256cb..38b43bdcb0 100644 --- a/lib/debugger/test/int_SUITE.erl +++ b/lib/debugger/test/int_SUITE.erl @@ -71,6 +71,14 @@ groups() -> {append, [], [append_1, append_2]}]. init_per_suite(Config) -> + DataDir = proplists:get_value(data_dir, Config), + {ok,OldCwd} = file:get_cwd(), + try + ok = file:set_cwd(DataDir), + make:all() + after + file:set_cwd(OldCwd) + end, Config. end_per_suite(_Config) -> diff --git a/lib/debugger/test/int_SUITE_data/Emakefile b/lib/debugger/test/int_SUITE_data/Emakefile new file mode 100644 index 0000000000..6158d66764 --- /dev/null +++ b/lib/debugger/test/int_SUITE_data/Emakefile @@ -0,0 +1 @@ +{[guards,lists1,my_lists,ordsets1,test,test1],[{outdir,"."},debug_info]}. diff --git a/lib/debugger/test/int_SUITE_data/Makefile.src b/lib/debugger/test/int_SUITE_data/Makefile.src deleted file mode 100644 index d5697623cd..0000000000 --- a/lib/debugger/test/int_SUITE_data/Makefile.src +++ /dev/null @@ -1,40 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 2000-2016. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# %CopyrightEnd% -# -EFLAGS=+debug_info -all: guards.@EMULATOR@ lists1.@EMULATOR@ my_lists.@EMULATOR@ \ - ordsets1.@EMULATOR@ test.@EMULATOR@ test1.@EMULATOR@ - -guards.@EMULATOR@: guards.erl - erlc $(EFLAGS) guards.erl - -lists1.@EMULATOR@: lists1.erl - erlc $(EFLAGS) lists1.erl - -my_lists.@EMULATOR@: my_lists.erl - erlc $(EFLAGS) my_lists.erl - -ordsets1.@EMULATOR@: ordsets1.erl - erlc $(EFLAGS) ordsets1.erl - -test.@EMULATOR@: test.erl - erlc $(EFLAGS) test.erl - -test1.@EMULATOR@: test1.erl - erlc $(EFLAGS) test1.erl -- cgit v1.2.3