process-codecov.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. LOGDIR=$1
  3. POSTFIX=$2
  4. RESTORE=$3
  5. DIR=$PWD
  6. TMPDIR=/tmp/logs
  7. mv $LOGDIR/alt-wpa_supplicant $TMPDIR
  8. mv $LOGDIR/alt-hostapd $TMPDIR
  9. mv $LOGDIR/alt-hostapd-as $TMPDIR
  10. mv $LOGDIR/alt-hlr_auc_gw $TMPDIR
  11. cd $TMPDIR/alt-wpa_supplicant/wpa_supplicant
  12. lcov -c -d .. 2> lcov.log | sed s%SF:/tmp/logs/alt-[^/]*/%SF:/tmp/logs/alt-wpa_supplicant/% > $TMPDIR/lcov-wpa_supplicant.info-$POSTFIX &
  13. cd $TMPDIR/alt-hostapd/hostapd
  14. lcov -c -d .. 2> lcov.log | sed s%SF:/tmp/logs/alt-[^/]*/%SF:/tmp/logs/alt-wpa_supplicant/% > $TMPDIR/lcov-hostapd.info-$POSTFIX &
  15. cd $TMPDIR/alt-hostapd-as/hostapd
  16. lcov -c -d .. 2> lcov.log | sed s%SF:/tmp/logs/alt-[^/]*/%SF:/tmp/logs/alt-wpa_supplicant/% > $TMPDIR/lcov-hostapd-as.info-$POSTFIX &
  17. cd $TMPDIR/alt-hlr_auc_gw/hostapd
  18. lcov -c -d .. 2> lcov.log | sed s%SF:/tmp/logs/alt-[^/]*/%SF:/tmp/logs/alt-wpa_supplicant/% > $TMPDIR/lcov-hlr_auc_gw.info-$POSTFIX &
  19. wait
  20. cd $DIR
  21. if [ "$RESTORE" == "restore" ]; then
  22. mv $TMPDIR/alt-* $LOGDIR
  23. else
  24. rm -r $TMPDIR/alt-wpa_supplicant
  25. rm -r $TMPDIR/alt-hostapd
  26. rm -r $TMPDIR/alt-hostapd-as
  27. rm -r $TMPDIR/alt-hlr_auc_gw
  28. fi