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 690b1d5
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/configuration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ class Configuration : public IConfiguration
setKey("python-command", "python");
#ifdef __FreeBSD__
setKey("bash-command", "/usr/local/bin/bash");
setKey("bash-use-ps4", 1);
#else
setKey("bash-command", "/bin/bash");
#endif
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 690b1d5

Please sign in to comment.