Skip to content

Commit

Permalink
Improve code coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
ooreilly committed Oct 27, 2022
1 parent c9ea792 commit c5acd20
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ int main(int argc, char *argv[])
ksw_extz_t ez;
gzFile fp[2];

while ((c = getopt(argc, argv, "t:w:R:e:rscxvgz:A:B:O:E:Ka")) >= 0) {
while ((c = getopt(argc, argv, "t:w:R:e:rscxvgqz:A:B:O:E:Ka")) >= 0) {
if (c == 't') algo = optarg;
else if (c == 'w') w = atoi(optarg);
else if (c == 'R') rep = atoi(optarg);
Expand All @@ -194,6 +194,7 @@ int main(int argc, char *argv[])
else if (c == 'x') flag |= KSW_EZ_EXTZ_ONLY;
else if (c == 'v') flag |= KSW_EZ_REV_CIGAR;
else if (c == 'g') flag |= KSW_EZ_APPROX_MAX | KSW_EZ_APPROX_DROP;
else if (c == 'q') flag |= KSW_EZ_EQX;
else if (c == 'K') no_kalloc = 1;
else if (c == 'A') a = atoi(optarg);
else if (c == 'B') b = atoi(optarg);
Expand Down
21 changes: 14 additions & 7 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if [ -z "$KSW2COV" ]; then
KSW2COV=./ksw2-test
fi

# Test code coverage of ksw2
# Test code coverage of ksw2
u=$1
t=$2

Expand All @@ -13,14 +13,21 @@ $KSW2COV $u $t ${@:2}
# Enables KSW_EZ_RIGHT
$KSW2COV $u $t -r ${@:2}

## Enables KSW_EZ_GENERIC_SC
$KSW2COV $u $t -c ${@:2}
## Enables KSW_EZ_GENERIC_SC
$KSW2COV $u $t -c ${@:2}

# Enables KSW_EZ_REV_CIGAR
$KSW2COV $u $t -v ${@:2}
# Enables KSW_EZ_REV_CIGAR
$KSW2COV $u $t -v ${@:2}

# Enables KSW_EZ_EXTZ_ONLY
$KSW2COV $u $t -x ${@:2}
# Enables KSW_EZ_EXTZ_ONLY
$KSW2COV $u $t -x ${@:2}

# Enables KSW_EZ_APPROX_MAX
$KSW2COV $u $t -g ${@:2}

# Enables KSW_EZ_EQX
# This option is disabled because the baseline kernel segmentation faults with this option enabled
# $KSW2COV $u $t -q ${@:2}

# Sets end_bonus and zdrop
$KSW2COV $u $t ${@:2} -x -e 1 -z 1
Expand Down

0 comments on commit c5acd20

Please sign in to comment.