Eliom을 사용하고 OUnit을 사용하여 단위 테스트를위한 컴파일 프로세스를 설정하는 데 문제가있는 새 프로젝트를 빌드 중입니다. 내가 ocsigenserver
를 사용하지 않고 Js_Client_Code.eliom에 단위 테스트를 실행할 수 있도록 나는이 방법으로 파일을 설정 한Eliom Framework의 단위 테스트
Js_Client_Code.eliom - contains all of the client side code
Project.eliom - contains all of the server side code (including opening Js_Client_Code.eliom)
:
나는 두 개의 파일이 있습니다.
이 시험에 대한 내 현재 메이크입니다 :
test: prep unit_tests
prep:
eliomc -infer Js_Client_Code.eliom
js_of_eliom -linkall -a Js_Client_Code.eliom -o file_a.cma
eliomc -a -linkall Js_Client_Code.eliom -o file_b.cma
# Code is here to move the cma files back to the parent directory, since they are written to _client/ and _server/ by default
unit_tests:
ocamlfind ocamlc -thread -syntax camlp4o -package ounit,js_of_ocaml.syntax \
-linkpkg -g -o UnitTests file_a.cma file_b.cma unit_tests.ml
쉘에 make test
실행이
File "unit_tests.ml", line 1:
Error: Error while linking file_a.cma(Js_Client_Code):
Reference to undefined global `Eliom_client'
내가 Eliom/Js_of_ocaml 컴파일 과정을 오해, 아니면 그냥이 잘못된에 대한 것인가 생산 방법?