Skip to content

Commit

Permalink
Issue #77: robot-framework: Add regression test for pie-executables (…
Browse files Browse the repository at this point in the history
…accumulation currently fails)
  • Loading branch information
SimonKagstrom committed Mar 14, 2015
1 parent b805c9f commit 31714f2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ add_executable(main-tests-gcov ${main_tests_SRCS})
set_target_properties(main-tests-gcov PROPERTIES COMPILE_FLAGS "--coverage")
set_target_properties(main-tests-gcov PROPERTIES LINK_FLAGS "--coverage")

add_executable(pie-test argv-dependent.c)
set_target_properties(pie-test PROPERTIES COMPILE_FLAGS "-g -fpie -fPIE")
set_target_properties(pie-test PROPERTIES LINK_FLAGS "-pie")

target_link_libraries(dlopen dl)


Expand Down
26 changes: 26 additions & 0 deletions tests/robot-framework/kcov-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ short-filename
${rc}= Run and return RC ${kcov} ${out} ./s
Should be equal as integers ${rc} 99

# Position-independent executables
pie
Run rm -rf ${out}/pie
${no_kcov_rc}= Run and return RC ./pie
Expand All @@ -250,6 +251,31 @@ pie
${output}= Run ${xml_lookup} ${out}/pie/cobertura.xml pie_c 5
Should Contain ${output} 1

pie-argv-basic
Run rm -rf ${out}/pie-test
${rc}= Run and return RC ${kcov} ${out} ./pie-test
Should be equal as integers ${rc} 0
${output}= Run ${xml_lookup} ${out}/pie-test/cobertura.xml argv_dependent_c 5
Should Contain ${output} 1
${output}= Run ${xml_lookup} ${out}/pie-test/cobertura.xml argv_dependent_c 11
Should Contain ${output} 0

pie-accumulate
[Tags] not_ready
Run rm -rf ${out}/pie-test
${rc}= Run and return RC ${kcov} ${out} ./pie-test
Should be equal as integers ${rc} 0
${output}= Run ${xml_lookup} ${out}/pie-test/cobertura.xml argv_dependent_c 5
Should Contain ${output} 1
${output}= Run ${xml_lookup} ${out}/pie-test/cobertura.xml argv_dependent_c 11
Should Contain ${output} 0
${rc}= Run and return RC ${kcov} ${out} ./pie-test a
Should be equal as integers ${rc} 0
${output}= Run ${xml_lookup} ${out}/pie-test/cobertura.xml argv_dependent_c 11
Should Contain ${output} 1
${output}= Run ${xml_lookup} ${out}/pie-test/cobertura.xml argv_dependent_c 5
Should Contain ${output} 1

global-constructors-test
Run rm -rf ${out}/global-constructors
${no_kcov_rc}= Run and return RC ./global-constructors
Expand Down

0 comments on commit 31714f2

Please sign in to comment.