From 7be3830522aa13cdb6f4a3ec8d69520ba289003a Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Thu, 17 Sep 2026 00:15:09 +0200 Subject: [PATCH 1/5] Use gdiff on FreeBSD to avoid test suite output differences --- mutaml.opam | 1 + mutaml.opam.template | 1 + 2 files changed, 2 insertions(+) diff --git a/mutaml.opam b/mutaml.opam index 5313ed0..825cdcf 100644 --- a/mutaml.opam +++ b/mutaml.opam @@ -37,6 +37,7 @@ x-maintenance-intent: ["(latest)"] build: [ ["dune" "subst"] {dev} [ + "MUTAML_DIFF_COMMAND='gdiff -u'" {os = "freebsd"} "dune" "build" "-p" diff --git a/mutaml.opam.template b/mutaml.opam.template index 892c85d..9f9ac75 100644 --- a/mutaml.opam.template +++ b/mutaml.opam.template @@ -1,6 +1,7 @@ build: [ ["dune" "subst"] {dev} [ + "MUTAML_DIFF_COMMAND='gdiff -u'" {os = "freebsd"} "dune" "build" "-p" From 810b7aad920d5789bc2a16d2a78e5ed9f6842987 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Tue, 6 Oct 2026 22:27:40 +0200 Subject: [PATCH 2/5] Revert "Use gdiff on FreeBSD to avoid test suite output differences" This reverts commit 7be3830522aa13cdb6f4a3ec8d69520ba289003a. --- mutaml.opam | 1 - mutaml.opam.template | 1 - 2 files changed, 2 deletions(-) diff --git a/mutaml.opam b/mutaml.opam index 825cdcf..5313ed0 100644 --- a/mutaml.opam +++ b/mutaml.opam @@ -37,7 +37,6 @@ x-maintenance-intent: ["(latest)"] build: [ ["dune" "subst"] {dev} [ - "MUTAML_DIFF_COMMAND='gdiff -u'" {os = "freebsd"} "dune" "build" "-p" diff --git a/mutaml.opam.template b/mutaml.opam.template index 9f9ac75..892c85d 100644 --- a/mutaml.opam.template +++ b/mutaml.opam.template @@ -1,7 +1,6 @@ build: [ ["dune" "subst"] {dev} [ - "MUTAML_DIFF_COMMAND='gdiff -u'" {os = "freebsd"} "dune" "build" "-p" From d4961e1f95c51d170815dfcadde3da5469cc9361 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 7 Oct 2026 20:38:41 +0200 Subject: [PATCH 3/5] Set MUTAML_DIFF_COMMAND to gdiff on FreeBSD in cram tests for consistent behaviour --- test/instrumentation-tests/function-merge-consecutive.t | 3 +++ test/instrumentation-tests/match.t | 3 +++ 2 files changed, 6 insertions(+) diff --git a/test/instrumentation-tests/function-merge-consecutive.t b/test/instrumentation-tests/function-merge-consecutive.t index e0d3bc8..b26da4f 100644 --- a/test/instrumentation-tests/function-merge-consecutive.t +++ b/test/instrumentation-tests/function-merge-consecutive.t @@ -4,6 +4,9 @@ Create dune and dune-project files: $ export MUTAML_SEED=896745231 $ export MUTAML_MUT_RATE=100 +Use gdiff on FreeBSD: + $ if [ $(opam var os) = "freebsd" ]; then export MUTAML_DIFF_COMMAND="gdiff -u"; fi + An example with only conservative, GADT-safe mutations: -------------------------------------------------------------------------------- diff --git a/test/instrumentation-tests/match.t b/test/instrumentation-tests/match.t index edc65f5..a5396e6 100644 --- a/test/instrumentation-tests/match.t +++ b/test/instrumentation-tests/match.t @@ -1,6 +1,9 @@ Create dune and dune-project files: $ bash ../write_dune_files.sh +Use gdiff on FreeBSD: + $ if [ $(opam var os) = "freebsd" ]; then export MUTAML_DIFF_COMMAND="gdiff -u"; fi + Make an .ml-file: $ cat > test.ml <<'EOF' > let () = match !Sys.interactive with From a9bdf577684bd9f8c92a199308c2d13c16869da8 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 7 Oct 2026 21:24:33 +0200 Subject: [PATCH 4/5] Set MUTAML_DIFF_COMMAND to gdiff on FreeBSD in cram tests, without relying on 'opam' --- test/instrumentation-tests/function-merge-consecutive.t | 2 +- test/instrumentation-tests/match.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/instrumentation-tests/function-merge-consecutive.t b/test/instrumentation-tests/function-merge-consecutive.t index b26da4f..c8ce2bc 100644 --- a/test/instrumentation-tests/function-merge-consecutive.t +++ b/test/instrumentation-tests/function-merge-consecutive.t @@ -5,7 +5,7 @@ Create dune and dune-project files: $ export MUTAML_MUT_RATE=100 Use gdiff on FreeBSD: - $ if [ $(opam var os) = "freebsd" ]; then export MUTAML_DIFF_COMMAND="gdiff -u"; fi + $ if [ -x "$(command -v uname)" ] && [ $(uname -s) = "FreeBSD" ]; then export MUTAML_DIFF_COMMAND="gdiff -u"; fi An example with only conservative, GADT-safe mutations: diff --git a/test/instrumentation-tests/match.t b/test/instrumentation-tests/match.t index a5396e6..af72e2e 100644 --- a/test/instrumentation-tests/match.t +++ b/test/instrumentation-tests/match.t @@ -2,7 +2,7 @@ Create dune and dune-project files: $ bash ../write_dune_files.sh Use gdiff on FreeBSD: - $ if [ $(opam var os) = "freebsd" ]; then export MUTAML_DIFF_COMMAND="gdiff -u"; fi + $ if [ -x "$(command -v uname)" ] && [ $(uname -s) = "FreeBSD" ]; then export MUTAML_DIFF_COMMAND="gdiff -u"; fi Make an .ml-file: $ cat > test.ml <<'EOF' From d1811f99f90eea96c5bfc88809cbdf19894ea474 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 7 Oct 2026 21:33:43 +0200 Subject: [PATCH 5/5] Add a CHANGES entry --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 99010a2..3f8145c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,7 @@ NEXT RELEASE ------------ -... +- Use `MUTAML_DIFF_COMMAND="gdiff -u"` in cram tests on FreeBSD for consistent output #53 0.4 ---