]> granicus.if.org Git - libexpat/commitdiff
coverage.sh: Cover -funsigned-char for #109
authorSebastian Pipping <sebastian@pipping.org>
Thu, 3 Aug 2017 19:11:37 +0000 (21:11 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Thu, 3 Aug 2017 19:11:37 +0000 (21:11 +0200)
expat/coverage.sh

index 0600847a441091efd7d343094f03cbfa4d133ec4..8f2e4d6eda3333f5c60db78a9f295e05469383bf 100755 (executable)
@@ -21,7 +21,12 @@ _get_build_dir() {
         mingw_part=__windows
     fi
 
-    echo "build__${version}__unicode_${unicode_enabled}__xml_context_${xml_context}${libbsd_part}${mingw_part}"
+    local char_part=
+    if ${with_unsigned_char}; then
+        char_part=__unsigned_char
+    fi
+
+    echo "build__${version}__unicode_${unicode_enabled}__xml_context_${xml_context}${libbsd_part}${mingw_part}${char_part}"
 }
 
 
@@ -95,6 +100,8 @@ _run() {
     local BASE_FLAGS='-pipe -Wall -Wextra -pedantic -Wno-overlength-strings'
     BASE_FLAGS+=' --coverage --no-inline'
 
+    ${with_unsigned_char} && BASE_FLAGS="${BASE_FLAGS} -funsigned-char"
+
     local CFLAGS="-std=c99 ${BASE_FLAGS}"
     local CXXFLAGS="-std=c++98 ${BASE_FLAGS}"
 
@@ -193,6 +200,7 @@ _main() {
     }
 
     # All combinations:
+    with_unsigned_char=false
     with_libbsd=false
     for with_mingw in true false ; do
         for unicode_enabled in false ; do
@@ -204,6 +212,7 @@ _main() {
 
     # Single cases:
     with_libbsd=true _build_case
+    with_unsigned_char=true _build_case
 
     echo
     echo 'Merging coverage files...'