Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ replace = version = "{new_version}"
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

[bumpversion:file:tests/integration/tests/py-only/version/sample.py-itest]
search = Version: {current_version}
replace = Version: {new_version}

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ test-lit-real: ## Run tests against FileCheck C++.
cd tests/integration && make clean

CURRENT_DIR=$(PWD) \
REAL_ONLY=1 \
FILECHECK_EXEC=$(FILECHECK_REAL_EXEC) \
PATH=$(PWD)/tests/integration/tools/FileCheck:$(PWD)/tests/integration/tools:$$PATH \
lit \
Expand Down
5 changes: 3 additions & 2 deletions filecheck/FileCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ def print_help():


def print_version():
print(__version__)

print("filecheck: Python port of LLVM's FileCheck, flexible pattern matching file verifier")
print("https://github.com/stanislaw/FileCheck.py")
print("Version: {}".format(__version__))

def escape_non_regex_or_skip(match_obj):
non_regex = match_obj.group('non_regex')
Expand Down
6 changes: 5 additions & 1 deletion tests/integration/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ config.test_format = lit.formats.ShTest("0")
# https://stackoverflow.com/a/39861848/598057
current_dir = os.environ.get('CURRENT_DIR', '')
filecheck_exec = os.environ.get('FILECHECK_EXEC', '')
real_only = os.environ.get('REAL_ONLY', '')

config.substitutions.append(('%CURRENT_DIR', current_dir))
config.substitutions.append(('%FILECHECK_EXEC', filecheck_exec))
config.substitutions.append(('%COMPARE_EXEC', "{}/tests/integration/tools/compare_dirs".format(current_dir)))
config.substitutions.append(('%FILECHECK_TESTER_EXEC', "{}/tests/integration/tools/FileCheck/FileCheck".format(current_dir)))

config.suffixes = ['.itest']
if real_only:
config.suffixes = ['.itest']
else:
config.suffixes = ['.itest', '.py-itest']
4 changes: 4 additions & 0 deletions tests/integration/tests/py-only/version/sample.py-itest
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
; RUN: %FILECHECK_EXEC --version | %FILECHECK_TESTER_EXEC %s --match-full-lines
; CHECK: {{^.*}}FileCheck{{(\.py)?$}}
; CHECK: Version: 0.0.5
; CHECK-EMPTY: