Skip to content

Commit

Permalink
test: add compiler/autoconf option tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoMSantos authored and jnikula committed Feb 8, 2025
1 parent 4013ba1 commit 3f2bed5
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/c/autoconf-invalid.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WARNING: autoconf: ['invalid'] unsupported option(s) ignored
12 changes: 12 additions & 0 deletions test/c/autoconf-invalid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
test:
- extension
directives:
- domain: c
directive: autodoc
arguments:
- doc.c
conf-overrides:
hawkmoth_autoconf:
- 'invalid'
errors: autoconf-invalid.stderr
expected: doc.rst
13 changes: 13 additions & 0 deletions test/c/autoconf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
test:
- extension
directives:
- domain: c
directive: autodoc
arguments:
- bool.c
conf-overrides:
hawkmoth_clang: -nostdinc
hawkmoth_compiler: clang
hawkmoth_autoconf:
- 'stdinc'
expected: bool.rst
1 change: 1 addition & 0 deletions test/c/compiler-autoconf-mismatch.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WARNING: autoconf: 'stdinc' option ignored (missing compiler)
13 changes: 13 additions & 0 deletions test/c/compiler-autoconf-mismatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
test:
- extension
directives:
- domain: c
directive: autodoc
arguments:
- doc.c
conf-overrides:
hawkmoth_compiler: null
hawkmoth_autoconf:
- 'stdinc'
errors: compiler-autoconf-mismatch.stderr
expected: doc.rst
2 changes: 2 additions & 0 deletions test/c/compiler-not-found.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
WARNING: get_include_args: c compiler not found ('invalid')
WARNING: get_include_args: c++ compiler not found ('invalid')
11 changes: 11 additions & 0 deletions test/c/compiler-not-found.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
test:
- extension
directives:
- domain: c
directive: autodoc
arguments:
- doc.c
conf-overrides:
hawkmoth_compiler: invalid
errors: compiler-not-found.stderr
expected: doc.rst
2 changes: 2 additions & 0 deletions test/c/compiler-unknown.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
WARNING: get_include_args: incompatible c compiler ('false')
WARNING: get_include_args: incompatible c++ compiler ('false')
11 changes: 11 additions & 0 deletions test/c/compiler-unknown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
test:
- extension
directives:
- domain: c
directive: autodoc
arguments:
- doc.c
conf-overrides:
hawkmoth_compiler: false
errors: compiler-unknown.stderr
expected: doc.rst

0 comments on commit 3f2bed5

Please sign in to comment.