diff options
author | Nadrieril | 2024-04-16 13:30:03 +0200 |
---|---|---|
committer | Nadrieril | 2024-04-18 11:26:35 +0200 |
commit | cfda3a990cb3b24d91ce5bf8d1ddec7b265beca5 (patch) | |
tree | 4a578bc9facb08e7948cefccce40eb7362beb6bc | |
parent | b4c3829305cac70827f6cbca2e90b0ef8be00d47 (diff) |
Ensure we regenerate files properly in CI
Files that weren't regenerated were marked as not
automatically-generated.
27 files changed, 9 insertions, 32 deletions
@@ -83,7 +83,7 @@ doc: cd compiler && dune build @doc .PHONY: clean -clean: +clean: clean-generated cd compiler && dune clean # Test the project by translating test files to F* @@ -99,6 +99,11 @@ test-all: test-no_nested_borrows test-paper \ test-loops \ test-arrays test-traits test-bitwise test-demo +.PHONY: clean-generated +clean-generated: + # We can't put this line in `tests/Makefile` otherwise it will detect itself :D + grep -lR 'THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS' tests | xargs rm + # Verify the F* files generated by the translation .PHONY: verify verify: @@ -75,23 +75,20 @@ export AENEAS_EXE=./aeneas # Copy the tests - mkdir tests-copy cp -r tests tests-copy - # TODO: remove the test files to make sure we regenerate exactly - # the files which are checked out (we have to be careful about - # files like lakefile.lean, and the user hand-written files) - # Run the tests with extra sanity checks enabled # Remark: we could remove the file + make clean-generated OPTIONS=-checks make test-all -j $NIX_BUILD_CORES # Check that there are no differences between the generated tests # and the original tests - if [[ $(diff -rq tests tests-copy) ]]; then + if diff -rq tests tests-copy; then echo "Ok: the regenerated test files are the same as the checked out files" else echo "Error: the regenerated test files differ from the checked out files" + diff -ru tests tests-copy exit 1 fi ''; diff --git a/tests/coq/betree/BetreeMain_FunsExternal.v b/tests/coq/betree/BetreeMain_FunsExternal.v index 07dba263..2d77c4ed 100644 --- a/tests/coq/betree/BetreeMain_FunsExternal.v +++ b/tests/coq/betree/BetreeMain_FunsExternal.v @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [betree_main]: external functions. -- This is a template file: rename it to "FunsExternal.lean" and fill the holes. *) Require Import Primitives. diff --git a/tests/coq/betree/BetreeMain_TypesExternal.v b/tests/coq/betree/BetreeMain_TypesExternal.v index 50c4a4f8..870d2601 100644 --- a/tests/coq/betree/BetreeMain_TypesExternal.v +++ b/tests/coq/betree/BetreeMain_TypesExternal.v @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [betree_main]: external types. -- This is a template file: rename it to "TypesExternal.lean" and fill the holes. *) Require Import Primitives. diff --git a/tests/coq/hashmap_on_disk/HashmapMain_FunsExternal.v b/tests/coq/hashmap_on_disk/HashmapMain_FunsExternal.v index a03dc407..fb5f23cd 100644 --- a/tests/coq/hashmap_on_disk/HashmapMain_FunsExternal.v +++ b/tests/coq/hashmap_on_disk/HashmapMain_FunsExternal.v @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [hashmap_main]: external function declarations *) Require Import Primitives. Import Primitives. diff --git a/tests/coq/hashmap_on_disk/HashmapMain_TypesExternal.v b/tests/coq/hashmap_on_disk/HashmapMain_TypesExternal.v index 87568232..28651c14 100644 --- a/tests/coq/hashmap_on_disk/HashmapMain_TypesExternal.v +++ b/tests/coq/hashmap_on_disk/HashmapMain_TypesExternal.v @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [hashmap_main]: external types. -- This is a template file: rename it to "TypesExternal.lean" and fill the holes. *) Require Import Primitives. diff --git a/tests/coq/misc/External_FunsExternal.v b/tests/coq/misc/External_FunsExternal.v index 130b48a2..39f4a60e 100644 --- a/tests/coq/misc/External_FunsExternal.v +++ b/tests/coq/misc/External_FunsExternal.v @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [external]: external function declarations *) Require Import Primitives. Import Primitives. diff --git a/tests/coq/misc/External_TypesExternal.v b/tests/coq/misc/External_TypesExternal.v index 3f02b839..734c66e5 100644 --- a/tests/coq/misc/External_TypesExternal.v +++ b/tests/coq/misc/External_TypesExternal.v @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [external]: external types. -- This is a template file: rename it to "TypesExternal.lean" and fill the holes. *) Require Import Primitives. diff --git a/tests/hol4/betree/betreeMain_FunsScript.sml b/tests/hol4/betree/betreeMain_FunsScript.sml index bd16c16c..ae3c4de2 100644 --- a/tests/hol4/betree/betreeMain_FunsScript.sml +++ b/tests/hol4/betree/betreeMain_FunsScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [betree_main]: function definitions *) open primitivesLib divDefLib open betreeMain_TypesTheory betreeMain_OpaqueTheory diff --git a/tests/hol4/betree/betreeMain_OpaqueScript.sml b/tests/hol4/betree/betreeMain_OpaqueScript.sml index 1d16db4c..04a547e1 100644 --- a/tests/hol4/betree/betreeMain_OpaqueScript.sml +++ b/tests/hol4/betree/betreeMain_OpaqueScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [betree_main]: external function declarations *) open primitivesLib divDefLib open betreeMain_TypesTheory diff --git a/tests/hol4/betree/betreeMain_TypesScript.sml b/tests/hol4/betree/betreeMain_TypesScript.sml index 779f6abb..685df462 100644 --- a/tests/hol4/betree/betreeMain_TypesScript.sml +++ b/tests/hol4/betree/betreeMain_TypesScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [betree_main]: type definitions *) open primitivesLib divDefLib diff --git a/tests/hol4/hashmap/hashmap_FunsScript.sml b/tests/hol4/hashmap/hashmap_FunsScript.sml index 682c5760..6678de4b 100644 --- a/tests/hol4/hashmap/hashmap_FunsScript.sml +++ b/tests/hol4/hashmap/hashmap_FunsScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [hashmap]: function definitions *) open primitivesLib divDefLib open hashmap_TypesTheory diff --git a/tests/hol4/hashmap/hashmap_TypesScript.sml b/tests/hol4/hashmap/hashmap_TypesScript.sml index a0865956..6b91bdde 100644 --- a/tests/hol4/hashmap/hashmap_TypesScript.sml +++ b/tests/hol4/hashmap/hashmap_TypesScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [hashmap]: type definitions *) open primitivesLib divDefLib diff --git a/tests/hol4/hashmap_on_disk/hashmapMain_FunsScript.sml b/tests/hol4/hashmap_on_disk/hashmapMain_FunsScript.sml index c1e30aa6..153f7cd9 100644 --- a/tests/hol4/hashmap_on_disk/hashmapMain_FunsScript.sml +++ b/tests/hol4/hashmap_on_disk/hashmapMain_FunsScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [hashmap_main]: function definitions *) open primitivesLib divDefLib open hashmapMain_TypesTheory hashmapMain_OpaqueTheory diff --git a/tests/hol4/hashmap_on_disk/hashmapMain_OpaqueScript.sml b/tests/hol4/hashmap_on_disk/hashmapMain_OpaqueScript.sml index f7221d92..4e3c01c0 100644 --- a/tests/hol4/hashmap_on_disk/hashmapMain_OpaqueScript.sml +++ b/tests/hol4/hashmap_on_disk/hashmapMain_OpaqueScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [hashmap_main]: external function declarations *) open primitivesLib divDefLib open hashmapMain_TypesTheory diff --git a/tests/hol4/hashmap_on_disk/hashmapMain_TypesScript.sml b/tests/hol4/hashmap_on_disk/hashmapMain_TypesScript.sml index 3f8ca9b9..14ba1890 100644 --- a/tests/hol4/hashmap_on_disk/hashmapMain_TypesScript.sml +++ b/tests/hol4/hashmap_on_disk/hashmapMain_TypesScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [hashmap_main]: type definitions *) open primitivesLib divDefLib diff --git a/tests/hol4/misc-constants/constantsScript.sml b/tests/hol4/misc-constants/constantsScript.sml index 40a319c6..20228a38 100644 --- a/tests/hol4/misc-constants/constantsScript.sml +++ b/tests/hol4/misc-constants/constantsScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [constants] *) open primitivesLib divDefLib diff --git a/tests/hol4/misc-external/external_FunsScript.sml b/tests/hol4/misc-external/external_FunsScript.sml index f3692ee2..65433aff 100644 --- a/tests/hol4/misc-external/external_FunsScript.sml +++ b/tests/hol4/misc-external/external_FunsScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [external]: function definitions *) open primitivesLib divDefLib open external_TypesTheory external_OpaqueTheory diff --git a/tests/hol4/misc-external/external_OpaqueScript.sml b/tests/hol4/misc-external/external_OpaqueScript.sml index b5a6d91d..e5faf97c 100644 --- a/tests/hol4/misc-external/external_OpaqueScript.sml +++ b/tests/hol4/misc-external/external_OpaqueScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [external]: external function declarations *) open primitivesLib divDefLib open external_TypesTheory diff --git a/tests/hol4/misc-external/external_TypesScript.sml b/tests/hol4/misc-external/external_TypesScript.sml index d290c3f6..207eea8d 100644 --- a/tests/hol4/misc-external/external_TypesScript.sml +++ b/tests/hol4/misc-external/external_TypesScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [external]: type definitions *) open primitivesLib divDefLib diff --git a/tests/hol4/misc-loops/loops_FunsScript.sml b/tests/hol4/misc-loops/loops_FunsScript.sml index 65cf77d4..6bb079a9 100644 --- a/tests/hol4/misc-loops/loops_FunsScript.sml +++ b/tests/hol4/misc-loops/loops_FunsScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [loops]: function definitions *) open primitivesLib divDefLib open loops_TypesTheory diff --git a/tests/hol4/misc-loops/loops_TypesScript.sml b/tests/hol4/misc-loops/loops_TypesScript.sml index e3e5b8d1..aec26414 100644 --- a/tests/hol4/misc-loops/loops_TypesScript.sml +++ b/tests/hol4/misc-loops/loops_TypesScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [loops]: type definitions *) open primitivesLib divDefLib diff --git a/tests/hol4/misc-no_nested_borrows/noNestedBorrowsScript.sml b/tests/hol4/misc-no_nested_borrows/noNestedBorrowsScript.sml index 1b2d6121..85a9bd8b 100644 --- a/tests/hol4/misc-no_nested_borrows/noNestedBorrowsScript.sml +++ b/tests/hol4/misc-no_nested_borrows/noNestedBorrowsScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [no_nested_borrows] *) open primitivesLib divDefLib diff --git a/tests/hol4/misc-paper/paperScript.sml b/tests/hol4/misc-paper/paperScript.sml index 3ac5b6ca..71e9b6d1 100644 --- a/tests/hol4/misc-paper/paperScript.sml +++ b/tests/hol4/misc-paper/paperScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [paper] *) open primitivesLib divDefLib diff --git a/tests/hol4/misc-polonius_list/poloniusListScript.sml b/tests/hol4/misc-polonius_list/poloniusListScript.sml index 06876ed4..d5b6422c 100644 --- a/tests/hol4/misc-polonius_list/poloniusListScript.sml +++ b/tests/hol4/misc-polonius_list/poloniusListScript.sml @@ -1,4 +1,3 @@ -(** THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS *) (** [polonius_list] *) open primitivesLib divDefLib diff --git a/tests/lean/External/Opaque.lean b/tests/lean/External/Opaque.lean index d0297523..6cec334f 100644 --- a/tests/lean/External/Opaque.lean +++ b/tests/lean/External/Opaque.lean @@ -1,4 +1,3 @@ --- THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS -- [external]: opaque function definitions import Base import External.Types diff --git a/tests/lean/HashmapMain/Opaque.lean b/tests/lean/HashmapMain/Opaque.lean index abf04c94..a410b253 100644 --- a/tests/lean/HashmapMain/Opaque.lean +++ b/tests/lean/HashmapMain/Opaque.lean @@ -1,4 +1,3 @@ --- THIS FILE WAS AUTOMATICALLY GENERATED BY AENEAS -- [hashmap_main]: opaque function definitions import Base import HashmapMain.Types |