Skip to content

Commit

Permalink
Rebuild the reftest roots if root version changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 authored and rjbou committed Jul 21, 2023
1 parent e0a390d commit eb81070
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ users)
* Admin: add a full test [#5385 @rjbou]
* Lint
* E29: Add conflicts test and simplify W41 to no more trigger E29 [#5535 @rjbou]
* Detect change in root version when switching branches and re-build test roots [#5481 @dra27]

### Engine

Expand Down
13 changes: 13 additions & 0 deletions tests/reftests/dune
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,17 @@
(action
(diff dune.inc dune.inc.gen)))

(rule
(with-stdout-to opam-root-version
(run ./root_version.exe)))

(executable
(name root_version)
(libraries opam-format)
(modules root_version))

(rule
(with-stdout-to root_version.ml
(echo "print_endline (OpamVersion.to_string OpamFile.Config.root_version)")))

(include dune.inc)
15 changes: 15 additions & 0 deletions tests/reftests/dune.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,7 @@

(rule
(targets root-N0REP0)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1337,6 +1338,7 @@

(rule
(targets root-0070613707)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1357,6 +1359,7 @@

(rule
(targets root-009e00fa)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1377,6 +1380,7 @@

(rule
(targets root-11ea1cb)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1397,6 +1401,7 @@

(rule
(targets root-297366c)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1417,6 +1422,7 @@

(rule
(targets root-3235916)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1437,6 +1443,7 @@

(rule
(targets root-7090735c)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1457,6 +1464,7 @@

(rule
(targets root-7371c1d9)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1477,6 +1485,7 @@

(rule
(targets root-a5d7cdc0)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1497,6 +1506,7 @@

(rule
(targets root-ad4dd344)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1517,6 +1527,7 @@

(rule
(targets root-c1842d168d)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1537,6 +1548,7 @@

(rule
(targets root-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1557,6 +1569,7 @@

(rule
(targets root-c1d23f0e)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1577,6 +1590,7 @@

(rule
(targets root-de897adf36c4230dfea812f40c98223b31c4521a)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand All @@ -1597,6 +1611,7 @@

(rule
(targets root-f372039d)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand Down
1 change: 1 addition & 0 deletions tests/reftests/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ let opam_init_rule archive_hash =
Format.sprintf {|
(rule
(targets %s)
(deps opam-root-version)
(action
(progn
(ignore-stdout
Expand Down

0 comments on commit eb81070

Please sign in to comment.