Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Jan 28, 2021
1 parent 0bc5e35 commit baf8b0c
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 17 deletions.
24 changes: 19 additions & 5 deletions tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ class TestExamples(TestCase):
Verify that example run scripts work correctly
"""

def setUp(self):
def __init__(self, name):
super().__init__(name)
self.shell = [which('bash')] if platform == 'win32' else []
self.root = Path(__file__).parent.parent
self.vhpidirect = self.root / 'vhpidirect'
self.vpi = self.root / 'vpi'

self.output_path = self.root / 'examples_run_out'
self.report_file = self.output_path / 'xunit.xml'

def setUp(self):
print('\n::group::Log')
sys.stdout.flush()

Expand All @@ -40,3 +38,19 @@ def _sh(self, args):

def _py(self, args):
check_call([executable] + args, stderr=STDOUT)


class TestVHPIDIRECT(TestExamples):

def __init__(self, name):
super().__init__(name)
self.vhpidirect = self.root / 'vhpidirect'
self.output_path = self.root / 'examples_run_out'
self.report_file = self.output_path / 'xunit.xml'


class TestVPI(TestExamples):

def __init__(self, name):
super().__init__(name)
self.vpi = self.root / 'vpi'
4 changes: 2 additions & 2 deletions tests/test_vhpidirect_arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"""

import pytest
from common import TestExamples, isWin
from common import TestVHPIDIRECT, isWin


class TestVHPIDIRECTArrays(TestExamples):
class TestArrays(TestVHPIDIRECT):
"""
Verify that vhpidirect/arrays example run scripts work correctly
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_vhpidirect_grt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Verify that vhpidirect/grt example run scripts work correctly
"""

from common import TestExamples
from common import TestVHPIDIRECT


class TestVHPIDIRECTGRT(TestExamples):
class TestGRT(TestVHPIDIRECT):
"""
Verify that vhpidirect/grt example run scripts work correctly
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_vhpidirect_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Verify that vhpidirect/quickstart example run scripts work correctly
"""

from common import TestExamples, isWin
from common import TestVHPIDIRECT, isWin


class TestVHPIDIRECTQuickStart(TestExamples):
class TestQuickStart(TestVHPIDIRECT):
"""
Verify that vhpidirect/quickstart example run scripts work correctly
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_vhpidirect_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"""

import pytest
from common import TestExamples, isWin
from common import TestVHPIDIRECT, isWin


class TestVHPIDIRECTShared(TestExamples):
class TestShared(TestVHPIDIRECT):
"""
Verify that vhpidirect/shared example run scripts work correctly
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_vhpidirect_vffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import pytest
from os import environ
from shutil import which
from common import TestExamples, isWin
from common import TestVHPIDIRECT, isWin


class TestVHPIDIRECTVFFI(TestExamples):
class TestVFFI(TestVHPIDIRECT):
"""
Verify that vhpidirect/vffi example run scripts work correctly
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_vpi_quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Verify that vpi/quickstart example run scripts work correctly
"""

from common import TestExamples
from common import TestVPI


class TestVPIQuickStart(TestExamples):
class TestQuickStart(TestVPI):
"""
Verify that vpi/quickstart example run scripts work correctly
"""
Expand Down

0 comments on commit baf8b0c

Please sign in to comment.