"Fossies" - the Fresh Open Source Software Archive

Member "versions-1.5.5/tests/coverage.bash" (27 Oct 2021, 734 Bytes) of package /linux/misc/versions-1.5.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "coverage.bash": 1.5.4_vs_1.5.5.

    1 #!/bin/bash
    2 #
    3 # A basic coverage script
    4 # Usage :
    5 # coverage.bash COVERAGE-COMMAND
    6 # Where COVERAGE-COMMAND is the command for
    7 # coverage program
    8 
    9 set -eu
   10 
   11 export COV=$1
   12 
   13 function header_print {
   14 
   15     echo
   16     echo "-------------------------------------------------"
   17     echo " Running test $@"
   18     echo "-------------------------------------------------"
   19     echo
   20 }
   21 
   22 function first_run_test {
   23 
   24     header_print $@
   25     ${COV} run ../versions/versions.py $@
   26 
   27 }
   28 
   29 
   30 function run_test {
   31 
   32     header_print $@
   33     ${COV} run -a ../versions/versions.py $@
   34 
   35 }
   36 
   37 first_run_test -d -f coverage.yaml
   38 run_test -d -f doesnotexist.yaml
   39 run_test -l -f coverage.yaml
   40 run_test -f bad_formatted.yaml
   41 run_test -f versions.yaml
   42 run_test -l -f versions.yaml