Skip to content

Commit

Permalink
move test reference files into their own subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
hassec committed Feb 13, 2022
1 parent 87bdcb4 commit d0131eb
Show file tree
Hide file tree
Showing 23 changed files with 2 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion tests/bash_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Config:
dyld_library_path = os.path.join(bin_dir, '../lib')
ld_library_path = os.path.join(bin_dir, '../lib')
data_dir = os.path.join(exiv2_dir, 'test/data')
ref_dir = os.path.join(data_dir, 'test_reference_files')
tmp_dir = os.path.join(exiv2_dir, 'test/tmp')
system_name = platform.system() or 'Unknown' # It could be Windows, Linux, etc.
exiv2_http = 'http://127.0.0.1'
Expand Down Expand Up @@ -550,7 +551,7 @@ def reportTest(testname, output: str, encoding=None,forgive=False):
""" If the output of the test case is correct, this function returns None. Otherwise print its error. """
output = str(output) + '\n'
encoding = encoding or Config.encoding
reference_file = os.path.join(Config.data_dir, '{}.out'.format(testname))
reference_file = os.path.join(Config.ref_dir, '{}.out'.format(testname))
reference_output = cat(reference_file, encoding=encoding)
if reference_output == output:
return
Expand Down

0 comments on commit d0131eb

Please sign in to comment.