Skip to content

Commit

Permalink
test: Dump outpuit
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Mar 11, 2024
1 parent 86370a6 commit b2fcb76
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ jobs:
sync: rsync
prepare: pkg install -y binutils cmake elfutils python bash git python2
run: |
sudo ln -s /usr/local/bin/bash /bin/bash
chmod u+x .github/workflows/freebsd-build.sh .github/workflows/ci-run-tests.sh
.github/workflows/freebsd-build.sh x86_64
.github/workflows/ci-run-tests.sh
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/freebsd-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ run () {

chmod u+x .github/workflows/test-executable.sh
kcov --include-pattern=test-executable.sh coverage .github/workflows/test-executable.sh
cat coverage/test-executable.sh/coverage.json
}

run "$@"
1 change: 1 addition & 0 deletions src/engines/bash-engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class BashEngine : public ScriptEngineBase
const char **argv = conf.getArgv();
unsigned int argc = conf.getArgc();
int xtraceFd = 782; // Typical bash users use 3,4 etc but not high fd numbers (?)
if (0)
{
// However, the range of fd numbers that this process can use is limited by the caller of this process.
// The following code specification will require discussion with many kcov users.
Expand Down
2 changes: 2 additions & 0 deletions tests/tools/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def runTest(self):
rv,o = self.do(testbase.kcov + " --bash-dont-parse-binary-dir --include-path=" + testbase.sources + "/tests/bash/first-dir " + testbase.outbase + "/kcov " + testbase.sources + "/tests/bash/shell-main")

dom = parse_cobertura.parseFile(testbase.outbase + "/kcov/shell-main/cobertura.xml")
f = open(testbase.outbase + "/kcov/shell-main/cobertura.xml").read()
print(f)
assert parse_cobertura.hitsPerLine(dom, "shell-main", 29) == None
assert parse_cobertura.hitsPerLine(dom, "c.sh", 3) >= 1
assert parse_cobertura.hitsPerLine(dom, "b.sh", 3) >= 1
Expand Down

0 comments on commit b2fcb76

Please sign in to comment.