[gjs] build: Correctly report version in code coverage report



commit fb5e2b07d1444bdb67dd6fed43af567c4d3be750
Author: Philip Chimento <philip chimento gmail com>
Date:   Fri Oct 25 22:19:49 2019 -0700

    build: Correctly report version in code coverage report
    
    This was mistakenly left as "x.y.z" and I never fixed it. Use meson's
    introspect command to find the version.
    
    Unreviewed, pushing along with other build fixes.

 tools/run_coverage.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/tools/run_coverage.sh b/tools/run_coverage.sh
index 16ee691e..d2e891de 100755
--- a/tools/run_coverage.sh
+++ b/tools/run_coverage.sh
@@ -10,10 +10,16 @@ IGNORE="*/gjs/test/* *-resources.c *minijasmine.cpp"
 
 rm -rf "$BUILDDIR"
 meson "$BUILDDIR" -Db_coverage=true
+
+VERSION=$(meson introspect "$BUILDDIR" --projectinfo | python -c 'import json, sys; 
print(json.load(sys.stdin)["version"])')
+
 ninja -C "$BUILDDIR"
 mkdir -p _coverage
 ninja -C "$BUILDDIR" test
 lcov --directory "$BUILDDIR" --capture --output-file _coverage/gjs.lcov.run --no-checksum $LCOV_ARGS
 lcov --extract _coverage/gjs.lcov.run "$SOURCEDIR/*" "$GIDATADIR/tests/*" $LCOV_ARGS -o 
_coverage/gjs.lcov.sources
 lcov --remove _coverage/gjs.lcov.sources $IGNORE $LCOV_ARGS -o _coverage/gjs.lcov
-genhtml --prefix "$BUILDDIR/lcov/org/gnome/gjs" --prefix "$BUILDDIR" --prefix "$SOURCEDIR" --prefix 
"$GIDATADIR" --output-directory _coverage/html --title "gjs-x.y.z Code Coverage" $GENHTML_ARGS 
_coverage/gjs.lcov "$BUILDDIR"/lcov/coverage.lcov
+genhtml --prefix "$BUILDDIR/lcov/org/gnome/gjs" --prefix "$BUILDDIR" --prefix "$SOURCEDIR" --prefix 
"$GIDATADIR" \
+    --output-directory _coverage/html \
+    --title "gjs-$VERSION Code Coverage" \
+    $GENHTML_ARGS _coverage/gjs.lcov "$BUILDDIR"/lcov/coverage.lcov


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]