Commit 050dc38d authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Remove all remaining occurences of LURETTE_PATH.

+ fix the test breaks caused by previous commits (seed)
parent 6a277aeb
OASISFormat: 0.4
Name: Lutin
Version: 2.12
Version: 2.13
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
License: PROP
......
......@@ -8,4 +8,4 @@ go:
test: go
rm rdbg.rif
rm -f luciole.rif
......@@ -12,6 +12,7 @@ $(EXPDIR):
[ -d $(EXPDIR) ] || (mkdir -p $(EXPDIR) ; make utest)
# several oracles
test1.rif: heater_control$(EXE) $(EXPDIR)
rm -f test1.rif0 .lurette_rc
......@@ -21,7 +22,7 @@ test1.rif: heater_control$(EXE) $(EXPDIR)
-rp "oracle:v6:heater_control.lus:not_a_fridge" \
-rp "env:lutin:env.lut:-m:main:-seed:3" && \
grep -v "lurette chronogram" test1.rif0 | \
grep -v "This is lurette Version" test1.rif0 | \
grep -v "This is lurette Version" test1.rif0 | grep -v "#seed" | \
grep -v "The execution lasted"| sed -e "s/^M//" > test1.rif
test1: test1.rif $(EXPDIR)
......@@ -41,7 +42,7 @@ test2.rif:
-rp "sut:v6:heater_control.lus:heater_control:" \
-rp "env:lutin:degradable-sensors.lut:-m:main:-seed:3" && \
grep -v "lurette chronogram" test2.rif0 | \
grep -v "This is lurette Version" test2.rif0 | \
grep -v "This is lurette Version" test2.rif0 | grep -v "#seed" |\
grep -v "The execution lasted"| sed -e "s/^M//" > test2.rif
test2:test2.rif $(EXPDIR)
......@@ -62,7 +63,7 @@ test3.rif: heater_control.cmxs
-rp "sut:ocaml:heater_control.cmxs:" \
-rp "env:lutin:degradable-sensors.lut:-m:main:-seed:3" && \
grep -v "lurette chronogram" test3.rif0 | \
grep -v "This is lurette Version" test3.rif0 | \
grep -v "This is lurette Version" test3.rif0 |grep -v "#seed" | \
grep -v "The execution lasted"| sed -e "s/^M//" > test3.rif
test3:test3.rif $(EXPDIR)
......@@ -79,10 +80,10 @@ test4.rif: heater_control$(EXE)
-rp "env:lutin:env.lut:-m:main1:-seed:3" \
-rp "env:lutin:env.lut:-m:main2:-seed:3" && \
grep -v "lurette chronogram" test4.rif0 | \
grep -v "This is lurette Version" test4.rif0 | \
grep -v "This is lurette Version" test4.rif0 | grep -v "#seed" | \
grep -v "The execution lasted"| sed -e "s/^M//" > test4.rif
test4:test4.rif $(EXPDIR)/
test4:test4.rif $(EXPDIR)
rm -f test4.res
diff -u -i $(EXPDIR)/test4.rif.exp test4.rif > test4.res || true
ifneq (,$(findstring $(HOSTTYPE),win32))
......@@ -156,7 +157,7 @@ test_dontgo:
rm -f test.rif0 .lurette_rc
$(LURETTETOP) --output test.rif0 env.lut && \
grep -v "lurette chronogram" test.rif0 | \
grep -v "The execution lasted"| sed -e "s/^M//" > test.rif &&\
grep -v "The execution lasted"| sed -e "s/^M//" | grep -v "#seed" > test.rif &&\
rm -f test.res && diff -u -i $(EXPDIR)/test.rif.exp test.rif > test.res
[ ! -s test.res ] && make clean
......
......@@ -20,7 +20,7 @@ test.rif:
export GCC="/usr/bin/gcc -fPIC"
$(LURETTETOP) --test-length 2 -go --output test.rif0 env.lut && \
grep -v "lurette chronogram" test.rif0 | \
grep -v "This is lurette Version" test.rif0 | \
grep -v "This is lurette Version" test.rif0 | grep -v "#seed " | \
grep -v "The execution lasted"| sed -e "s/^M//" > test.rif
test:test.rif $(EXPDIR)
......
......@@ -158,7 +158,7 @@ let (f : LtopArg.t -> bool) =
(Filename.concat args.tmp_dir "Makefile")
else
(Filename.concat
(Filename.concat ExtTools.lurette_path "lib")
(Filename.concat (ExtTools.lurette_path()) "lib")
"Makefile.lurette")
in
let make_arg_list =
......
......@@ -350,7 +350,6 @@ type t =
| ExtraLibs of string
| ExtraLibDirs of string
| ExtraIncludeDirs of string
| Show
| HelpSimple
| Error of string
| SutCmd of string
......@@ -401,7 +400,6 @@ let rec (parse_tok : tok -> t) =
| [< 'MyGenlex.Ident(_, "set_direct_mode") >] -> args.direct_mode <- true; Nop
| [< 'MyGenlex.Ident(_, "set_old_mode") >] -> args.direct_mode <- false; Nop
| [< 'MyGenlex.Ident(_, "show") >] -> Show
| [< 'MyGenlex.Ident(_, "clean") >] -> Clean
| [< 'MyGenlex.Ident(_, "log") >] -> Log
| [< 'MyGenlex.Ident(_, "set_prompt"); str = parse_ident_or_string >] -> Prompt(str)
......@@ -898,12 +896,6 @@ let (read : string -> bool) =
args.reset_cov_file <- false;
true
)
| Show ->
let sdir = Unix.getcwd () in
Unix.chdir args.sut_dir;
ignore (ExtTools.show_luc args.env);
Unix.chdir sdir;
true
| CallSim2chro ->
let sdir = Unix.getcwd () in
Unix.chdir args.sut_dir;
......
......@@ -2,17 +2,14 @@
open LtopArg
let lurette_path =
let lurette_path () =
try Unix.getenv "LURETTE_PATH"
with _ ->
output_string args.ocr "lurettetop: Environment var LURETTE_PATH is unset.\n";
output_string args.ocr "You must use the lurettetop script, not lurettetop_exe.\n";
output_string args.ocr "Warning lurettetop: Environment var LURETTE_PATH is unset.\n";
flush args.ocr;
""
let lurette_bin = (Filename.concat lurette_path "bin")
let (make : string list) =
try Util2.string_to_string_list (Unix.getenv "MAKE")
with _ -> ["make"]
......@@ -102,7 +99,7 @@ let (gen_stubs : string -> string -> string -> string -> bool) =
empty_a_file ((chop_ext oracle) ^ "_io.c")
);
my_create_process (Filename.concat lurette_bin ("gen_stubs" ^ exe))
my_create_process ("gen_stubs" ^ exe)
([ sut; sut_node; (compiler_to_string args.sut_compiler)
] @
(if oracle = "" then [] else
......@@ -116,7 +113,7 @@ let (gen_stubs : string -> string -> string -> string -> bool) =
let (show_luc : string -> bool) =
fun luc_file ->
(my_create_process
(Filename.concat lurette_bin ("show_luc"))
"show_luc"
(luc_file::(
match args.pp with
None -> []
......@@ -132,7 +129,7 @@ exception LutinFailure
let (lutin : string -> string -> bool) =
fun lutfile outputfile ->
my_create_process
(Filename.concat lurette_bin ("lutin"))
"lutin"
[lutfile; outputfile]
stdin args.ocr args.ecr
......
(* a few useful constants depending on the system *)
val dot_exe:string
val lurette_path:string
val lurette_path: unit -> string
val make : string list
val lutin : string -> string -> bool
val gen_stubs : string -> string -> string -> string -> bool
val show_luc : string -> bool
......@@ -771,7 +771,7 @@ let rec speclist =
"\tDo not display environment local variables in sim2chro.\n" ;
"--ocaml-version", Arg.Unit (fun _ -> (print_string (Sys.ocaml_version) ; exit 0)),
"--ocaml-version", Arg.Unit (fun _ -> (print_string (Sys.ocaml_version^"\n") ; exit 0)),
"\t\tDisplay the version ocaml version lurette was compiled with and exit." ;
"--version", Arg.Unit (fun _ -> (print_string (Version.str^"-"^Version.sha) ; exit 0)),
......
......@@ -73,13 +73,9 @@ let main_read_arg () =
args.tmp_dir <- lurette_tmp_dir;
Unix.putenv "TMPDIR" (String.escaped lurette_tmp_dir) ;
in
let source_dir = (Filename.concat ExtTools.lurette_path "source") in
let source_dir = (Filename.concat (ExtTools.lurette_path()) "source") in
match args.sut_compiler with
| Scade ->
ignore (
Util2.cp (Filename.concat source_dir "memories.c") args.tmp_dir args.ocr args.ecr
&& Util2.cp (Filename.concat source_dir "LibMathAdvanced.c") args.tmp_dir args.ocr args.ecr
)
| Scade -> assert false
| VerimagV4
| VerimagV6
| ScadeGUI
......
let str="2.12"
let sha="3370a09"
let str="2.13"
let sha="6a277ae"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment