aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/test
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2012-03-22 18:02:27 +0100
committerLukas Larsson <[email protected]>2012-05-02 09:51:44 +0200
commit3378d4abca239185f4a282f5695c8dcdf9f96b76 (patch)
treef0faeed18a131e74af89e79fb54760cee88da8e0 /lib/erl_interface/test
parentb834e188e6a2df3b2fd689618d43e6f878a5d1e4 (diff)
downloadotp-3378d4abca239185f4a282f5695c8dcdf9f96b76.tar.gz
otp-3378d4abca239185f4a282f5695c8dcdf9f96b76.tar.bz2
otp-3378d4abca239185f4a282f5695c8dcdf9f96b76.zip
Fix cross compile of testcases
Diffstat (limited to 'lib/erl_interface/test')
-rw-r--r--lib/erl_interface/test/all_SUITE_data/Makefile.src2
-rw-r--r--lib/erl_interface/test/all_SUITE_data/init_tc.erl5
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/erl_interface/test/all_SUITE_data/Makefile.src b/lib/erl_interface/test/all_SUITE_data/Makefile.src
index 70652e47c5..39085def2d 100644
--- a/lib/erl_interface/test/all_SUITE_data/Makefile.src
+++ b/lib/erl_interface/test/all_SUITE_data/Makefile.src
@@ -32,7 +32,7 @@ all: $(ALL_OBJS)
$(EI_COMMON_OBJS): gccifier@exe@
-@IFEQ@ (@erl_interface_cross_compile@, true)
+@IFEQ@ (@cross@, yes)
gccifier@exe@:
$(CP) gccifier.sh gccifier@exe@
$(CHMOD) a+x gccifier@exe@
diff --git a/lib/erl_interface/test/all_SUITE_data/init_tc.erl b/lib/erl_interface/test/all_SUITE_data/init_tc.erl
index 7a599994fc..60c965eda3 100644
--- a/lib/erl_interface/test/all_SUITE_data/init_tc.erl
+++ b/lib/erl_interface/test/all_SUITE_data/init_tc.erl
@@ -48,8 +48,7 @@ run1(Name) ->
generate(TcName, Cases) ->
Hrl = TcName ++ "_cases.hrl",
{ok, HrlFile} = file:open(Hrl, write),
- {ok, Dir} = file:get_cwd(),
- generate_hrl(Cases, HrlFile, {filename:join(Dir, TcName), 0}),
+ generate_hrl(Cases, HrlFile, {TcName, 0}),
file:close(HrlFile),
C = TcName ++ "_decl.c",
{ok, CFile} = file:open(C, write),
@@ -57,7 +56,7 @@ generate(TcName, Cases) ->
file:close(CFile).
generate_hrl([Case|Rest], File, {Name, Number}) ->
- io:format(File, "-define(~s, {\"~s\", ~w}).~n", [Case, Name, Number]),
+ io:format(File, "-define(~s, {filename:join(proplists:get_value(data_dir,Config),\"~s\"), ~w}).~n", [Case, Name, Number]),
generate_hrl(Rest, File, {Name, Number+1});
generate_hrl([], _, _) ->
ok.