File tree Expand file tree Collapse file tree 12 files changed +65
-42
lines changed
demo-repository/exercises/demo Expand file tree Collapse file tree 12 files changed +65
-42
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ package "test_lib" (
44 description = "Learn-ocaml dependencies for automatic graders"
55 requires = "compiler-libs"
66)
7+ # DUNE_GEN
Original file line number Diff line number Diff line change 1+ learn-ocaml.mutation_testing
Original file line number Diff line number Diff line change 1+ (library
2+ (name mutation_testing)
3+ (public_name learn-ocaml.mutation_testing)
4+ (wrapped false)
5+ (modes byte)
6+ (libraries compiler-libs)
7+ ;; The following lines are specific for compiling from within learn-ocaml.
8+ ;; When writing grader-helper libs, use instead:
9+ ;; (libraries learn-ocaml.test_lib)
10+ ;; (preprocess (action (run %{libexec:learn-ocaml.test_lib:grader-ppx} %{input-file})))
11+ (flags (:standard -I src/grader/test_lib -open Test_lib.Open_me))
12+ (modules mutation_test)
13+ (preprocess (pps grader_ppx))
14+ (preprocessor_deps (alias ../grader/test_lib/test_lib_cmis))
15+ ;; this is not a preprocessor deps, but dune does not allow other kinds of deps...
16+ )
File renamed without changes.
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ module M: sig
100100 val passed_mutation_testing : Learnocaml_report .t -> bool
101101end
102102
103- include M
103+ include module type of M
104104
105105(* * For backwards compatibility *)
106- module Make (_: module type of Test_lib ) = M
106+ module Make (_: module type of Test_lib ): module type of M
Original file line number Diff line number Diff line change 3535 (library_flags :standard -linkall)
3636 (libraries ty
3737 toploop
38- learnocaml_ppx_metaquot
3938 learnocaml_ppx_metaquot_lib
39+ grader_ppx
4040 ocplib-json-typed
4141 learnocaml_report
4242 learnocaml_repository
4343 introspection_intf
4444 pre_test)
4545 (modules Test_lib)
46- (preprocess (pps learnocaml_ppx_metaquot ))
46+ (preprocess (pps grader_ppx ))
4747)
4848(rule
4949 (target testing_dyn.js)
167167 (run ocp-ocamlres -format ocamlres %{deps})))
168168)
169169
170- ;; cmis that are needed to precompile the graders for exercises
171- (install
172- (section lib)
173- (package learn-ocaml)
174- (files
175- (../ppx-metaquot/.ty.objs/byte/ty.cmi as test_lib/ty.cmi)
176- (../ppx-metaquot/.fun_ty.objs/byte/fun_ty.cmi as test_lib/fun_ty.cmi)
177- ;; (.exercise_init.objs/byte/exercise_init.cmi as test_lib/exercise_init.cmi)
178- (.introspection_intf.objs/byte/introspection_intf.cmi as test_lib/introspection_intf.cmi)
179- (.pre_test.objs/byte/learnocaml_internal.cmi as test_lib/learnocaml_internal.cmi)
180- (.pre_test.objs/byte/pre_test.cmi as test_lib/pre_test.cmi)
181- (.learnocaml_report.objs/byte/learnocaml_report.cmi as test_lib/learnocaml_report.cmi)
182- (.pre_test.objs/byte/learnocaml_callback.cmi as test_lib/learnocaml_callback.cmi) ;;FIXME separate lib??
183- (.testing_dyn.objs/byte/test_lib.cmi as test_lib/test_lib.cmi))
184- )
185-
186-
187170(library
188171 (name grading)
189172 (wrapped false)
190173 (modes byte)
191174 (library_flags :standard -linkall)
192- (libraries learnocaml_ppx_metaquot
175+ (libraries grader_ppx
193176 ocplib-ocamlres.runtime
194177 toploop
195178 learnocaml_internal_intf
201184 (modules Introspection
202185 Embedded_grading_lib
203186 Grading)
204- (preprocess (per_module ((pps ppx_ocplib_i18n learnocaml_ppx_metaquot ) Grading)))
187+ (preprocess (per_module ((pps ppx_ocplib_i18n grader_ppx ) Grading)))
205188)
206189
207190
Original file line number Diff line number Diff line change 1+ ;; cmis that are needed to precompile the graders for exercises
2+
3+ (rule
4+ (alias test_lib_cmis)
5+ (action (progn
6+ (copy %{dep:../../ppx-metaquot/.ty.objs/byte/ty.cmi} ty.cmi)
7+ (copy %{dep:../../ppx-metaquot/.fun_ty.objs/byte/fun_ty.cmi} fun_ty.cmi)
8+ ;; (copy %{dep:../.exercise_init.objs/byte/exercise_init.cmi} exercise_init.cmi)
9+ (copy %{dep:../.introspection_intf.objs/byte/introspection_intf.cmi} introspection_intf.cmi)
10+ (copy %{dep:../.pre_test.objs/byte/learnocaml_internal.cmi} learnocaml_internal.cmi)
11+ (copy %{dep:../.pre_test.objs/byte/pre_test.cmi} pre_test.cmi)
12+ (copy %{dep:../.learnocaml_report.objs/byte/learnocaml_report.cmi} learnocaml_report.cmi)
13+ (copy %{dep:../.pre_test.objs/byte/learnocaml_callback.cmi} learnocaml_callback.cmi)
14+ (copy %{dep:../.testing_dyn.objs/byte/test_lib.cmi} test_lib.cmi)))
15+ )
16+
17+ (install
18+ (section lib)
19+ (package learn-ocaml)
20+ (files
21+ (ty.cmi as test_lib/ty.cmi)
22+ (fun_ty.cmi as test_lib/fun_ty.cmi)
23+ ;; (exercise_init.cmi as test_lib/exercise_init.cmi)
24+ (introspection_intf.cmi as test_lib/introspection_intf.cmi)
25+ (learnocaml_internal.cmi as test_lib/learnocaml_internal.cmi)
26+ (pre_test.cmi as test_lib/pre_test.cmi)
27+ (learnocaml_report.cmi as test_lib/learnocaml_report.cmi)
28+ (learnocaml_callback.cmi as test_lib/learnocaml_callback.cmi)
29+ (test_lib.cmi as test_lib/test_lib.cmi))
30+ )
Original file line number Diff line number Diff line change 2020 (libraries ppx_tools compiler-libs)
2121)
2222
23- ;; (library
24- ;; (name learnocaml_recorder)
25- ;; (wrapped false)
26- ;; (modules Recorder)
27- ;; (libraries ppxlib))
28-
2923(library
30- (name learnocaml_ppx_metaquot )
24+ (name grader_ppx )
3125 (wrapped false)
3226 (libraries learnocaml_ppx_metaquot_lib ty fun_ty ocaml-migrate-parsetree ppxlib)
33- (modules Ppx_autoregister Ppx_metaquot_grader )
27+ (modules Ppx_autoregister Grader_ppx )
3428 (kind ppx_rewriter)
3529)
3630
3731(executable
38- (name ppx_metaquot_main )
39- (modules ppx_metaquot_main )
40- (libraries learnocaml_ppx_metaquot ))
32+ (name grader_ppx_main )
33+ (modules grader_ppx_main )
34+ (libraries grader_ppx ))
4135
4236(install
4337 (section libexec)
4438 (package learn-ocaml)
45- (files
46- (ppx_metaquot_main.exe as grading_ppx/learnocaml-ppx-grader))
39+ (files (grader_ppx_main.exe as test_lib/grader-ppx))
4740)
4841
4942(library
File renamed without changes.
Original file line number Diff line number Diff line change 1+ let () =
2+ Migrate_parsetree.Driver. run_main ~exit_on_error: true ()
You can’t perform that action at this time.
0 commit comments