]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Generate a combined code coverage report
authorJouni Malinen <j@w1.fi>
Sat, 28 Dec 2013 09:08:16 +0000 (11:08 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 28 Dec 2013 14:32:54 +0000 (16:32 +0200)
This combines coverage from all three separate reports into a single
report.

Signed-hostap: Jouni Malinen <j@w1.fi>

tests/hwsim/vm/vm-run.sh

index 0f556decbdbf17007fb3aba4cbba37837f9eac47..a2b9187f1f6f389524ba87aa6231eefe6d3378d9 100755 (executable)
@@ -130,6 +130,15 @@ if [ $CODECOV = "yes" ]; then
     genhtml -t "hostapd/hlr_auc_gw (AS) hwsim test run $DATE" lcov.info --output-directory $LOGDIR/lcov-hostapd-as >> lcov.log 2>&1
     mv lcov.info lcov.log $LOGDIR/lcov-hostapd-as
 
+    echo "Generating combined code coverage report"
+    mkdir $LOGDIR/lcov-combined
+    for i in wpa_supplicant hostapd hostapd-as; do
+       sed s%SF:/tmp/logs/alt-[^/]*/%SF:/tmp/logs/alt-wpa_supplicant/% < $LOGDIR/lcov-$i/lcov.info > $LOGDIR/lcov-combined/$i.info
+    done
+    cd $LOGDIR/lcov-combined
+    lcov -a wpa_supplicant.info -a hostapd.info -a hostapd-as.info -o combined.info > lcov.log 2>&1
+    genhtml -t "wpa_supplicant/hostapd combined for hwsim test run $DATE" combined.info --output-directory . >> lcov.log 2>&1
+
     cd $DIR
     rm -r /tmp/logs/alt-wpa_supplicant
     rm -r /tmp/logs/alt-hostapd
@@ -145,4 +154,5 @@ if [ $CODECOV = "yes" ]; then
     echo "wpa_supplicant: file://$LOGDIR/lcov-wpa_supplicant/index.html"
     echo "hostapd: file://$LOGDIR/lcov-hostapd/index.html"
     echo "hostapd/hlr_auc_gw (AS): file://$LOGDIR/lcov-hostapd-as/index.html"
+    echo "combined: file://$LOGDIR/lcov-combined/index.html"
 fi