Commits

Anonymous committed 1f18e54

still not running common_test. bad.

  • Participants
  • Parent commits 3841da8
  • Branches dev

Comments (0)

Files changed (4)

 test: build
 	@echo "testing in ${ROOT} .."
 	@mkdir -p test/log
-	sh ${RUN_TEST_CMD}  -dir ${ROOT}/test -logdir ${ROOT}/test/log \
-	  -I ${ROOT}/include -I ${ROOT}/src \
+	sh ${RUN_TEST_CMD} -dir ${ROOT}/test -logdir ${ROOT}/test/log \
+	  -I ${ROOT}/include -I ${ROOT}/src  \
 	  -cover ${ROOT}/test/yatce.coverspec  -pa ${ROOT}/ebin
 	@echo "automated test done. see test/log/index.html."
 

File ebin/tctest.erl

 	    ng
     end.
 
-main(Argv)->
-    [YatceLib|_] = Argv,
+main(_Argv)->
+%    [YatceLib|_] = Argv,
     code:add_path("./ebin"),
     ok=application:start(yatce),
 %    erlang:display( application:get_env(yatce, libdir) ),
 %    {ok, _Pid} = yatce:start([{libdir, YatceLib}]), % initialize the library
     {ok, all_passed} = yatce_server:test(),
     tcadb_test(),
-%    iter(),
+    iter(),
 %    yatce:stop().
     application:stop(yatce).
     

File src/yatce.erl

 
 start(_Type, RestartType)->
     {ok,CurrentDirectory} = application:get_env(yatce, libdir),
-						%proplists:get_value( libdir, Options, file:get_cwd() ),
     LibPath = CurrentDirectory,
-    SharedLib = ?DYLIB_NAME,
+    erlang:display( code:priv_dir(?MODULE) ),
+    erlang:display(LibPath),
     io:format("~p ~p: ~p~n", [?FILE, ?LINE, LibPath]),
 %%    case erl_ddll:load_driver(LibPath, SharedLib) of
-    case erl_ddll:try_load(LibPath, SharedLib, []) of
+    case erl_ddll:try_load(LibPath, ?DYLIB_NAME, []) of
 	{ok, _Status} -> 
 	    supervisor:start_link( {local, yatce_sup}, yatce_sup, [] );
         {error, already_loaded} ->

File test/yatce.coverspec

 
 %% Directories to include in cover.
 %% Dirs = [string()]
-{incl_dirs, ["../ebin"]}.
+%% {incl_dirs, ["../ebin"]}.
 
 %% Directories, including subdirectories, to include.
 %{incl_dirs_r, Dirs}.