Skip to content

Commit 675245b

Browse files
authored
doxygen: add missing runtime deps and update tests (#48258)
1 parent 1aa53c0 commit 675245b

File tree

1 file changed

+99
-9
lines changed

1 file changed

+99
-9
lines changed

doxygen.yaml

+99-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
package:
22
name: doxygen
33
version: "1.13.2"
4-
epoch: 1
4+
epoch: 2
55
description: A documentation system for C++, C, Java, IDL and PHP
66
copyright:
77
- license: GPL-2.0-or-later
8+
dependencies:
9+
runtime:
10+
- bzip2
11+
- graphviz
12+
- zlib
813

914
environment:
1015
contents:
@@ -18,6 +23,7 @@ environment:
1823
- cmake
1924
- coreutils
2025
- flex
26+
- graphviz
2127
- perl
2228
- python3
2329
- samurai
@@ -33,7 +39,9 @@ pipeline:
3339
-DGIT_EXECUTABLE=/bin/false \
3440
-DCMAKE_INSTALL_PREFIX=/usr \
3541
-DCMAKE_BUILD_TYPE=MinSizeRel \
36-
-Dbuild_xmlparser=ON
42+
-Dbuild_xmlparser=ON \
43+
-Wno-dev \
44+
-DCMAKE_BUILD_TYPE=Release
3745
cmake --build build
3846
DESTDIR="${{targets.destdir}}" cmake --install build
3947
@@ -45,13 +53,6 @@ update:
4553
identifier: 457
4654
version-separator: "_"
4755

48-
test:
49-
pipeline:
50-
# AUTOGENERATED
51-
- runs: |
52-
doxygen --version
53-
doxygen --help
54-
5556
subpackages:
5657
- name: doxygen-doc
5758
description: doxygen documentation
@@ -60,3 +61,92 @@ subpackages:
6061
test:
6162
pipeline:
6263
- uses: test/docs
64+
65+
test:
66+
pipeline:
67+
- name: Smoke check for doxygen CLI
68+
# AUTOGENERATED
69+
runs: |
70+
doxygen --version
71+
doxygen --help
72+
- name: Generate default configuration file
73+
runs: |
74+
doxygen -g Doxyfile
75+
test -f Doxyfile
76+
grep -q "PROJECT_NAME" Doxyfile
77+
- name: Run doxygen on simple C++ source
78+
runs: |
79+
mkdir -p testsrc
80+
cat > testsrc/test.cpp <<EOF
81+
/**
82+
* \\brief Adds two integers
83+
*
84+
* \\param a First integer
85+
* \\param b Second integer
86+
* \\return Sum of a and b
87+
*/
88+
int add(int a, int b) {
89+
return a + b;
90+
}
91+
EOF
92+
doxygen -g Doxyfile
93+
sed -i 's|^INPUT *=.*|INPUT = testsrc|' Doxyfile
94+
sed -i 's|^RECURSIVE *=.*|RECURSIVE = YES|' Doxyfile
95+
doxygen Doxyfile
96+
test -f html/index.html
97+
- name: Test dot integration with Graphviz
98+
runs: |
99+
doxygen -g Doxyfile
100+
sed -i 's|^HAVE_DOT *=.*|HAVE_DOT = YES|' Doxyfile
101+
sed -i 's|^CALL_GRAPH *=.*|CALL_GRAPH = YES|' Doxyfile
102+
sed -i 's|^CALLER_GRAPH *=.*|CALLER_GRAPH = YES|' Doxyfile
103+
mkdir -p graphsrc
104+
cat > graphsrc/main.c <<EOF
105+
void bar() {}
106+
void foo() { bar(); }
107+
int main() { foo(); return 0; }
108+
EOF
109+
sed -i 's|^INPUT *=.*|INPUT = graphsrc|' Doxyfile
110+
doxygen Doxyfile
111+
find . -name "*.png" | grep -q .
112+
- name: Run doxygen on bzip2-compressed input
113+
runs: |
114+
mkdir -p bzipsrc
115+
cat > bzipsrc/example.cpp <<EOF
116+
/**
117+
* \\brief Example function
118+
*/
119+
void example() {}
120+
EOF
121+
bzip2 bzipsrc/example.cpp
122+
doxygen -g Doxyfile
123+
sed -i 's|^INPUT *=.*|INPUT = bzipsrc|' Doxyfile
124+
sed -i 's|^RECURSIVE *=.*|RECURSIVE = YES|' Doxyfile
125+
doxygen Doxyfile
126+
test -f html/index.html
127+
- name: Include zlib-compressed asset in output
128+
runs: |
129+
mkdir -p zlibtest
130+
echo "dummy image" > zlibtest/diagram.png
131+
gzip -c zlibtest/diagram.png > zlibtest/diagram.png.gz
132+
doxygen -g Doxyfile
133+
sed -i 's|^INPUT *=.*|INPUT = zlibtest|' Doxyfile
134+
sed -i 's|^RECURSIVE *=.*|RECURSIVE = YES|' Doxyfile
135+
doxygen Doxyfile
136+
test -f html/index.html
137+
- name: Generate HTML then gzip it to test zlib
138+
runs: |
139+
mkdir -p htmltest
140+
cat > htmltest/index.h <<EOF
141+
/**
142+
* \\mainpage
143+
* This is a test page.
144+
*/
145+
EOF
146+
doxygen -g Doxyfile
147+
sed -i 's|^INPUT *=.*|INPUT = htmltest|' Doxyfile
148+
sed -i 's|^RECURSIVE *=.*|RECURSIVE = YES|' Doxyfile
149+
doxygen Doxyfile
150+
test -f html/index.html
151+
gzip html/index.html
152+
test -f html/index.html.gz

0 commit comments

Comments
 (0)