From bb98bf86894527817e0d00aa87286a4291937d03 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 27 Sep 2011 12:20:41 +0200 Subject: Remove test_server path instead of cwd for clash test With the introduction of common_test as test framework the working directory of the tests changed to be the emulator_test directory. So we now have to remove the ../test_server directory instead. This change only affect tests run with a emulator which has not been installed. --- lib/kernel/test/code_SUITE.erl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/kernel/test/code_SUITE.erl') diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index 86cccebc29..f7d56eed48 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -573,11 +573,13 @@ add_del_path(Config) when is_list(Config) -> clash(Config) when is_list(Config) -> DDir = ?config(data_dir,Config)++"clash/", P = code:get_path(), + [TestServerPath|_] = [Path || Path <- code:get_path(), + re:run(Path,"test_server/?$",[]) /= nomatch], %% test non-clashing entries - %% remove "." to prevent clash with test-server path - ?line true = code:del_path("."), + %% remove TestServerPath to prevent clash with test-server path + ?line true = code:del_path(TestServerPath), ?line true = code:add_path(DDir++"foobar-0.1/ebin"), ?line true = code:add_path(DDir++"zork-0.8/ebin"), test_server:capture_start(), @@ -589,8 +591,8 @@ clash(Config) when is_list(Config) -> %% test clashing entries - %% remove "." to prevent clash with test-server path - ?line true = code:del_path("."), + %% remove TestServerPath to prevent clash with test-server path + ?line true = code:del_path(TestServerPath), ?line true = code:add_path(DDir++"foobar-0.1/ebin"), ?line true = code:add_path(DDir++"foobar-0.1.ez/foobar-0.1/ebin"), test_server:capture_start(), @@ -603,9 +605,9 @@ clash(Config) when is_list(Config) -> %% test "Bad path can't read" - %% remove "." to prevent clash with test-server path + %% remove TestServerPath to prevent clash with test-server path Priv = ?config(priv_dir, Config), - ?line true = code:del_path("."), + ?line true = code:del_path(TestServerPath), TmpEzFile = Priv++"foobar-0.tmp.ez", ?line {ok, _} = file:copy(DDir++"foobar-0.1.ez", TmpEzFile), ?line true = code:add_path(TmpEzFile++"/foobar-0.1/ebin"), -- cgit v1.2.3 From d41617d9969253d9e66270beebac843865036baa Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 27 Sep 2011 17:14:08 +0200 Subject: Skip create_big_boot on platforms without crypto This has to be done as many other applications depend on that crypto is present. --- lib/kernel/test/code_SUITE.erl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/kernel/test/code_SUITE.erl') diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index f7d56eed48..b677f34ed0 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -81,6 +81,13 @@ init_per_suite(Config) -> end_per_suite(Config) -> Config. +init_per_testcase(big_boot_embedded, Config) -> + case catch crypto:start() of + ok -> + init_per_testcase(do_big_boot_embedded, Config); + _Else -> + {skip, "Needs crypto!"} + end; init_per_testcase(_Func, Config) -> Dog=?t:timetrap(?t:minutes(5)), P=code:get_path(), -- cgit v1.2.3