Skip to content

Commit

Permalink
Add Patch tests to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Mar 21, 2024
1 parent 2a50e4a commit b44ac26
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/auto-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Check out repository
uses: actions/checkout@v4
- name: Install auto-sync package
run: |
cd suite/auto-sync/
pip install -e .
pip install .
- name: Check formatting
run: |
ufmt check src
- name: CppTranslator - Patch tests
run: |
python -m unittest discover src/autosync/cpptranslator/Tests/
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
from autosync.cpptranslator import CppTranslator

from autosync.cpptranslator.Configurator import Configurator
from autosync.Helper import get_path

from tree_sitter import Node, Query


class TestPatches(unittest.TestCase):
@classmethod
def setUpClass(cls):
configurator = Configurator("ARCH", Path("test_config.json"))
configurator = Configurator("ARCH", get_path("{CPP_TRANSLATOR_TEST_CONFIG}"))
cls.translator = CppTranslator.Translator(configurator)
cls.ts_cpp_lang = configurator.get_cpp_lang()
cls.parser = configurator.get_parser()
Expand Down
2 changes: 2 additions & 0 deletions suite/auto-sync/src/autosync/path_vars.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

"{CPP_TRANSLATOR_DIR}": "{AUTO_SYNC_SRC}/cpptranslator/",
"{CPP_TRANSLATOR_CONFIG}": "{CPP_TRANSLATOR_DIR}/arch_config.json",
"{CPP_TRANSLATOR_TEST_DIR}": "{CPP_TRANSLATOR_DIR}/Tests/",
"{CPP_TRANSLATOR_TEST_CONFIG}": "{CPP_TRANSLATOR_TEST_DIR}/test_config.json",
"{INC_PATCH_DIR}": "{AUTO_SYNC_ROOT}/inc_patches/",

"{CS_INCLUDE_DIR}": "{CS_ROOT}/include/capstone/",
Expand Down

0 comments on commit b44ac26

Please sign in to comment.