Skip to content

Commit a85bc40

Browse files
Change story time json print to 13 digits to match tests on freebsd for opam CI
1 parent fb1f75e commit a85bc40

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,13 @@ clean: clean_doc clean_ide
142142
find . -name \*~ -delete
143143
+$(MAKE) KAPPABIN="$(CURDIR)/_build/install/default/bin/" -C tests/integration clean
144144

145+
# Run all tests
145146
check:
146147
dune runtest
147148
+$(MAKE) --no-print-directory KAPPABIN="$(CURDIR)/_build/install/default/bin/" -C tests/integration clean
148149
+$(MAKE) KAPPABIN="$(CURDIR)/_build/install/default/bin/" -C tests/integration all
149150

151+
# Change test results to match current implementation
150152
build-tests:
151153
dune promote
152154
+$(MAKE) KAPPABIN="$(CURDIR)/_build/install/default/bin/" -C tests/integration build

core/simulation/trace.ml

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ module Simulation_info = struct
5252
JsonUtil.write_sequence ob
5353
[
5454
(fun o -> Yojson.Basic.write_int o x.story_id);
55-
(fun o -> Yojson.Basic.write_float o x.story_time);
55+
(* "Only" 13 significant digits as max prec causes issues with opam CI on freebsd.
56+
* (See https://opam.ci.ocaml.org/github/ocaml/opam-repository/commit/91b8837bd693ab7fb62215fa396e96923b98d443/variant/freebsd,freebsd-ocaml-4.14-amd64,kappa-binaries.4.1.3,tests ) *)
57+
(fun o -> Yojson.Basic.write_float_prec 13 o x.story_time);
5658
(fun o -> Yojson.Basic.write_int o x.story_event);
5759
(fun o -> f o x.profiling_info);
5860
]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"nodes":[[8,[4,"ABA",[[[5,[[219,0],0],[[1472,1],1]],[1,[[219,0],0],1],[0,[219,0]],[5,[[1472,1],0],[[853,0],0]],[1,[[1472,1],0],1],[0,[1472,1]],[1,[[853,0],0],1],[0,[853,0]]]],[78,1.1628879508783985,20,null]]],[7,[1,4,[[[[0,[219,0]],[1,[[219,0],0],1],[2,[[219,0],0]]],[[0,[1472,1]],[1,[[1472,1],0],1],[2,[[1472,1],0]],[2,[[1472,1],1]]],[[0,[853,0]],[1,[[853,0],0],1],[2,[[853,0],0]]]],[[2,[[1472,1],0],[[853,0],0]],[2,[[219,0],0],[[1472,1],1]]],[],[],[]],[77,1.1628879508783985,20,null]]],[6,[1,0,[[[[0,[853,0]],[1,[[853,0],0],0],[2,[[853,0],0]]]],[[1,[[853,0],0],1]],[],[],[]],[26,0.7139442885533201,13,null]]],[5,[1,0,[[[[0,[219,0]],[1,[[219,0],0],0],[2,[[219,0],0]]]],[[1,[[219,0],0],1]],[],[],[]],[23,0.6915556185840467,12,null]]],[4,[1,1,[[[[0,[1472,1]],[1,[[1472,1],0],0],[2,[[1472,1],0]]]],[[1,[[1472,1],0],1]],[],[],[]],[15,0.6342608737053982,11,null]]],[3,[3,[[0,[1472,1],[[0,0],[1]]],[4,[[1472,1],1]],[4,[[1472,1],0]],[1,[[1472,1],0],0]]]],[2,[3,[[0,[853,0],[[0,0]]],[4,[[853,0],0]],[1,[[853,0],0],0]]]],[1,[3,[[0,[219,0],[[0,0]]],[4,[[219,0],0]],[1,[[219,0],0],0]]]]],"cause":[{"from":7,"to":8},{"from":6,"to":7},{"from":5,"to":7},{"from":4,"to":7},{"from":2,"to":6},{"from":1,"to":5},{"from":3,"to":4}],"inhibit":[]}
1+
{"nodes":[[8,[4,"ABA",[[[5,[[219,0],0],[[1472,1],1]],[1,[[219,0],0],1],[0,[219,0]],[5,[[1472,1],0],[[853,0],0]],[1,[[1472,1],0],1],[0,[1472,1]],[1,[[853,0],0],1],[0,[853,0]]]],[78,1.162887950878,20,null]]],[7,[1,4,[[[[0,[219,0]],[1,[[219,0],0],1],[2,[[219,0],0]]],[[0,[1472,1]],[1,[[1472,1],0],1],[2,[[1472,1],0]],[2,[[1472,1],1]]],[[0,[853,0]],[1,[[853,0],0],1],[2,[[853,0],0]]]],[[2,[[1472,1],0],[[853,0],0]],[2,[[219,0],0],[[1472,1],1]]],[],[],[]],[77,1.162887950878,20,null]]],[6,[1,0,[[[[0,[853,0]],[1,[[853,0],0],0],[2,[[853,0],0]]]],[[1,[[853,0],0],1]],[],[],[]],[26,0.7139442885533001,13,null]]],[5,[1,0,[[[[0,[219,0]],[1,[[219,0],0],0],[2,[[219,0],0]]]],[[1,[[219,0],0],1]],[],[],[]],[23,0.6915556185840001,12,null]]],[4,[1,1,[[[[0,[1472,1]],[1,[[1472,1],0],0],[2,[[1472,1],0]]]],[[1,[[1472,1],0],1]],[],[],[]],[15,0.6342608737054,11,null]]],[3,[3,[[0,[1472,1],[[0,0],[1]]],[4,[[1472,1],1]],[4,[[1472,1],0]],[1,[[1472,1],0],0]]]],[2,[3,[[0,[853,0],[[0,0]]],[4,[[853,0],0]],[1,[[853,0],0],0]]]],[1,[3,[[0,[219,0],[[0,0]]],[4,[[219,0],0]],[1,[[219,0],0],0]]]]],"cause":[{"from":7,"to":8},{"from":6,"to":7},{"from":5,"to":7},{"from":4,"to":7},{"from":2,"to":6},{"from":1,"to":5},{"from":3,"to":4}],"inhibit":[]}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"nodes":[[5,[4,"ApBp",[[[2,[[1916,1],0]],[1,[[1916,1],0],1],[0,[1916,1]]],[[2,[[151,0],0]],[1,[[151,0],0],1],[0,[151,0]]]],[0,0.46993044893821007,7,null]]],[4,[1,1,[[[[0,[1916,1]],[1,[[1916,1],0],0],[2,[[1916,1],0]]]],[[1,[[1916,1],0],1]],[],[],[]],[-1,0.46993044893821007,7,null]]],[3,[1,0,[[[[0,[151,0]],[1,[[151,0],0],0],[2,[[151,0],0]]]],[[1,[[151,0],0],1]],[],[],[]],[-1,0.4625723955666288,6,null]]],[2,[3,[[0,[1916,1],[[0,0],[1]]],[4,[[1916,1],1]],[4,[[1916,1],0]],[1,[[1916,1],0],0]]]],[1,[3,[[0,[151,0],[[0,0]]],[4,[[151,0],0]],[1,[[151,0],0],0]]]]],"cause":[{"from":4,"to":5},{"from":3,"to":5},{"from":2,"to":4},{"from":1,"to":3}],"inhibit":[]}
1+
{"nodes":[[5,[4,"ApBp",[[[2,[[1916,1],0]],[1,[[1916,1],0],1],[0,[1916,1]]],[[2,[[151,0],0]],[1,[[151,0],0],1],[0,[151,0]]]],[0,0.4699304489382,7,null]]],[4,[1,1,[[[[0,[1916,1]],[1,[[1916,1],0],0],[2,[[1916,1],0]]]],[[1,[[1916,1],0],1]],[],[],[]],[-1,0.4699304489382,7,null]]],[3,[1,0,[[[[0,[151,0]],[1,[[151,0],0],0],[2,[[151,0],0]]]],[[1,[[151,0],0],1]],[],[],[]],[-1,0.4625723955666,6,null]]],[2,[3,[[0,[1916,1],[[0,0],[1]]],[4,[[1916,1],1]],[4,[[1916,1],0]],[1,[[1916,1],0],0]]]],[1,[3,[[0,[151,0],[[0,0]]],[4,[[151,0],0]],[1,[[151,0],0],0]]]]],"cause":[{"from":4,"to":5},{"from":3,"to":5},{"from":2,"to":4},{"from":1,"to":3}],"inhibit":[]}

tests/integration/cflows/side-effects3/output/trace.json.ref

+1-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)