Skip to content

Commit

Permalink
Add Test For Possible Suppression Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fundamental committed May 21, 2017
1 parent 78c797f commit 64be902
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ set_property(TEST test-one
${SRC}/test/suppression_example.txt
${SRC}/test/test-input.c)

add_test(suppression-two
${RUBY} ${CMAKE_SOURCE_DIR}/test/run-test.rb
${CMAKE_SOURCE_DIR}/stoat
${CMAKE_BINARY_DIR}/libstoat.so
${CLANG}
${CMAKE_SOURCE_DIR}/data/whitelist.txt
${CMAKE_SOURCE_DIR}/data/blacklist.txt
${SRC}/test/suppression_two.txt
${SRC}/test/test-suppression.c)

set_property(TEST suppression-two
PROPERTY PASS_REGULAR_EXPRESSION
"1 error")

#Check that information is translated over multiple translation units
add_test(multi-translation-unit
${RUBY} ${CMAKE_SOURCE_DIR}/test/run-test.rb
Expand Down
2 changes: 2 additions & 0 deletions test/suppression_two.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
a ==> aa
b ==> bb
11 changes: 11 additions & 0 deletions test/test-suppression.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#define REALTIME __attribute__((annotate("realtime")))
#define NREALTIME __attribute__((annotate("non-realtime")))

void bb(void) NREALTIME
{
}

void a(void) REALTIME
{
bb();
}

0 comments on commit 64be902

Please sign in to comment.