Browse Source

Also test if it compiles

Jakob Truelsen 16 years ago
parent
commit
c5456ea0f8
1 changed files with 16 additions and 1 deletions
  1. 16 1
      test.sh

+ 16 - 1
test.sh

@@ -96,6 +96,20 @@ function testOutline() {
 		! cat tmp.pdf | grep -q ".b.a.z") && good Outline || bad Outline
 }
 
+function testBuild() {
+	rm -rf wkhtmltopdf
+	svn export -q .. wkhtmltopdf || (bad "Build $1" && return 1)
+	cd wkhtmltopdf
+	if [[ "$1" == "qmake" ]]; then
+		qmake 2>/dev/null >/dev/null || (bad "Build $1" && return 1)
+	else
+		cmake . 2>/dev/null >/dev/null || (bad "Build $1" && return 1)
+	fi
+	make -j5 >/dev/null 2>/dev/null && good "Build $1" || bad "Build $1"
+	cd ..
+	rm -rf wkhtmltopdf
+}
+
 good TestTest
 testLocalFileSupport 
 testToc
@@ -108,7 +122,8 @@ testImgSupport png
 testRemote 
 testSSL
 testHeaderFooter
-
+testBuild qmake
+testBuild cmake
 #Lets clean up
 rm tmp.html tmp.pdf
 exit $failed