Skip to content
Snippets Groups Projects
Commit 48c6c9ed authored by Thibaud Antignac's avatar Thibaud Antignac
Browse files

Final pass + add oracles to companion archive

parent d4f4af31
No related branches found
No related tags found
No related merge requests found
......@@ -85,8 +85,7 @@ examples/generated/%.ml: examples/%.ml
headache -r $@
archives: tutorial/hello/generated
cd tutorial/hello/generated/with_doc/; \
tar -zcvf ../../../../hello.tar.gz *
cd tutorial/hello/generated/with_doc/ && tar -zcvf ../../../../hello.tar.gz *
.PHONY: tutorial/hello/generated tutorial/viewcfg/generated
......
......@@ -287,7 +287,7 @@ Visible results of the registration include:
\begin{itemize}
\item ``hello world'' appears in the list of available plug-ins
(consultable with \texttt{frama-c -load-script
hello\_world.ml -help});
hello\_world.ml -plugins});
\item default options for the plug-in work, including the inline help
(available with \texttt{frama-c -load-script
hello\_world.ml -hello-help}).
......
......@@ -33,6 +33,10 @@ generated/src/tests/hello/%.c: src/%.c
cp $< $@
headache -r $<
generated/src/tests/hello/oracle/%.oracle: src/%.oracle
mkdir -p $(dir $@)
cp $< $@
generated/%/Hello.mli: src/Hello.mli
mkdir -p $(dir $@)
cp $< $@
......@@ -129,6 +133,8 @@ generated/with_doc: generated/src/help_msg.ml \
generated/src/hello_options.doc.ml \
generated/src/hello_print.doc.ml \
generated/src/hello_run.doc.ml \
generated/src/tests/hello/oracle/hello_test.err.oracle \
generated/src/tests/hello/oracle/hello_test.res.oracle \
generated/src/Makefile.test
mkdir -p $@
cp generated/src/hello_options.doc.ml $@/hello_options.ml
......@@ -157,6 +163,9 @@ generated/with_doc: generated/src/help_msg.ml \
cat generated/src/extend_run.ml >> $@/hello_run.ml
mkdir -p $@/tests/hello
cp generated/src/tests/hello/hello_test.c $@/tests/hello/hello_test.c
mkdir -p $@/tests/hello/oracle
cp generated/src/tests/hello/oracle/hello_test.err.oracle $@/tests/hello/oracle/hello_test.err.oracle
cp generated/src/tests/hello/oracle/hello_test.res.oracle $@/tests/hello/oracle/hello_test.res.oracle
cp generated/src/Makefile.test $@/Makefile
tests:
......
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/hello/hello_test.c (with preprocessing)
[hello] Hello, world!
......@@ -8,7 +8,6 @@ let output msg =
Printf.fprintf chan "%s\n" msg;
flush chan;
close_out chan
with exc ->
let msg = Printexc.to_string exc in
Printf.eprintf "There was an error: %s\n" msg;
raise exc
with Sys_error e ->
let msg = Printexc.to_string (Sys_error e) in
Printf.eprintf "There was an error: %s\n" msg
......@@ -4,7 +4,6 @@ let run () =
Printf.fprintf chan "Hello, world!\n";
flush chan;
close_out chan
with exc ->
let msg = Printexc.to_string exc in
Printf.eprintf "There was an error: %s\n" msg;
raise exc
with Sys_error e ->
let msg = Printexc.to_string (Sys_error e) in
Printf.eprintf "There was an error: %s\n" msg
......@@ -12,7 +12,6 @@ let run () =
close_out chan;
in
output "Hello, world!"
with exc ->
let msg = Printexc.to_string exc in
Printf.eprintf "There was an error: %s\n" msg;
raise exc
with Sys_error e ->
let msg = Printexc.to_string (Sys_error e) in
Printf.eprintf "There was an error: %s\n" msg
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment