mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
test_targets: capture output of failed tests
This commit is contained in:
parent
3ca6bd3340
commit
019b143854
1 changed files with 11 additions and 2 deletions
|
@ -67,7 +67,10 @@ python3 -m litex_boards.targets.simple litex_boards.platforms.{} \
|
|||
--no-compile \
|
||||
--uart-name="stub" \
|
||||
""".format(name)
|
||||
subprocess.check_call(cmd, shell=True)
|
||||
try:
|
||||
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
except subprocess.CalledProcessError as exc:
|
||||
raise self.failureException(exc.output) from None
|
||||
|
||||
# Build default configuration for all targets.
|
||||
def test_targets(self):
|
||||
|
@ -90,4 +93,10 @@ python3 -m litex_boards.targets.{} \
|
|||
--build \
|
||||
--no-compile \
|
||||
""".format(name)
|
||||
subprocess.check_call(cmd, shell=True)
|
||||
try:
|
||||
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
except subprocess.CalledProcessError as exc:
|
||||
raise self.failureException(exc.output) from None
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in a new issue