Skip to content
Snippets Groups Projects
Commit e36c92b4 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[tests] add test for #pragma pack with gcc

parent e14c38aa
No related branches found
No related tags found
No related merge requests found
...@@ -2,3 +2,9 @@ ...@@ -2,3 +2,9 @@
(applies_to user_directories.unix.t) (applies_to user_directories.unix.t)
(enabled_if (and (= %{os_type} unix) (<> %{system} macos))) (enabled_if (and (= %{os_type} unix) (<> %{system} macos)))
) )
(cram
(applies_to pragma-pack-gcc)
(enabled_if %{bin-available:gcc})
(deps pragma-pack.c pragma-pack-utils.h)
)
Testing that the output produced by Eva and the execution of the binary
compiled by GCC are identical, both on a 32-bit machdep and on a 64-bit one
# Note: we cannot currently test this in Nix due to issues with multiStdenv
# $ frama-c pragma-pack.c -machdep gcc_x86_32 -eva -eva-msg-key=-summary | grep -A999 "eva:final-states" | grep -v "\[eva:final-states\]" | grep -v __retres > eva.res
# $ gcc -m32 pragma-pack.c -Wno-pragmas && ./a.out > gcc.res
# $ diff -B eva.res gcc.res # should be identical
$ frama-c pragma-pack.c -machdep gcc_x86_64 -eva -eva-msg-key=-summary | grep -A999 "eva:final-states" | grep -v "\[eva:final-states\]" | grep -v __retres > eva.res
$ gcc pragma-pack.c -Wno-pragmas && ./a.out > gcc.res
$ diff -B eva.res gcc.res # should be identical
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment