Skip to content

Commit af6888a

Browse files
authored
Merge pull request #1071 from mpreisler/config_h_tests
Config h tests
2 parents cbada06 + 3f331d9 commit af6888a

File tree

9 files changed

+33
-1
lines changed

9 files changed

+33
-1
lines changed

tests/API/CVE/test_api_cve.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifdef HAVE_CONFIG_H
2+
#include <config.h>
3+
#endif
14

25
#include <stdio.h>
36
#include <string.h>

tests/API/CVRF/test_api_cvrf.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818
*
1919
*/
20+
21+
#ifdef HAVE_CONFIG_H
22+
#include <config.h>
23+
#endif
24+
2025
#include <stdio.h>
2126
#include <string.h>
2227
#include <cvss_score.h>

tests/API/OVAL/schema_version/test_schema_version.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* "Jan Černý" <[email protected]>
2121
*/
2222

23+
#ifdef HAVE_CONFIG_H
24+
#include <config.h>
25+
#endif
26+
2327
#include <stdio.h>
2428
#include <stdlib.h>
2529
#include "OVAL/public/oval_schema_version.h"

tests/API/XCCDF/unittests/test_oscap_common.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* Simon Lukasik <[email protected]>
2121
*/
2222

23+
#ifdef HAVE_CONFIG_H
24+
#include <config.h>
25+
#endif
26+
2327
#include <stdio.h>
2428
#include <string.h>
2529
#include "common/list.h"

tests/API/XCCDF/unittests/test_xccdf_overrides.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* Simon Lukasik <[email protected]>
2121
*/
2222

23+
#ifdef HAVE_CONFIG_H
24+
#include <config.h>
25+
#endif
26+
2327
#include <stdio.h>
2428

2529
#include <ds_rds_session.h>

tests/API/XCCDF/unittests/test_xccdf_shall_pass.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* Simon Lukasik <[email protected]>
2121
*/
2222

23+
#ifdef HAVE_CONFIG_H
24+
#include <config.h>
25+
#endif
26+
2327
#include <stdio.h>
2428

2529
#include <xccdf_benchmark.h>

tests/API/XCCDF/unittests/unit_helper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* Simon Lukasik <[email protected]>
2121
*/
2222

23+
#ifdef HAVE_CONFIG_H
24+
#include <config.h>
25+
#endif
26+
2327
#include "unit_helper.h"
2428
#include <xccdf_benchmark.h>
2529
#include <oval_agent_xccdf_api.h>

tests/bz2/test_bz2_memory_source.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
* Simon Lukasik <[email protected]>
2121
*/
2222

23+
#ifdef HAVE_CONFIG_H
24+
#include <config.h>
25+
#endif
26+
2327
#include <stdio.h>
2428
#include <string.h>
2529
#include <oscap_error.h>

tests/sources/all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function test_config_h(){
1313
ignore_list='(MurmurHash3.c|rbt_gen.c|oval_testing_ext_probe.c)$'
1414
echo "Files from this mask will not be checked: $ignore_list"
1515

16-
codebase=$(find $top_srcdir/src/ -name "*.c" | sort)
16+
codebase=$(find $top_srcdir/src/ $top_srcdir/tests/ -name "*.c" | sort)
1717
echo "$codebase" | grep -vE "$ignore_list" | while read filename;
1818
do
1919
grep -E "$text" "$filename" --quiet || {

0 commit comments

Comments
 (0)