Skip to content

Commit

Permalink
Move the testgenerator.py and processor.py tests to subdirectories. (#…
Browse files Browse the repository at this point in the history
…590)

We hope this will facilitate review of bulk edits to regression tests by
making it easier to review each of these sets of tests together.
  • Loading branch information
mattmccutchen-cci authored May 18, 2021
1 parent 2b8a064 commit 81cbd4c
Show file tree
Hide file tree
Showing 254 changed files with 18 additions and 2 deletions.
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.
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.
6 changes: 4 additions & 2 deletions clang/test/3C/find_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ def die(msg):
llvm_obj_maybe = os.environ.get('LLVM_OBJ')
standard_build_dir = '../../../build'
if llvm_obj_maybe is not None:
bin_path = llvm_obj_maybe + '/bin/'
# Now that some of the callers of find_bin call `chdir` afterwards, we have
# to make the path absolute here.
bin_path = os.path.abspath(llvm_obj_maybe) + '/bin/'
if not os.path.isfile(bin_path + '3c'):
die('$LLVM_OBJ is set but the bin directory does not contain 3c.')
elif os.path.isdir(standard_build_dir):
bin_path = standard_build_dir + '/bin/'
bin_path = os.path.abspath(standard_build_dir) + '/bin/'
if not os.path.isfile(bin_path + '3c'):
die('The standard build directory exists but does not contain 3c.')
elif lit.util.which('3c') is not None:
Expand Down
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
4 changes: 4 additions & 0 deletions clang/test/3C/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import find_bin
bin_path = find_bin.bin_path

# Change to the subdirectory after calling `find_bin` (which assumes a working
# directory of `clang/test/3C`) but before doing anything else.
os.chdir("b_tests")

structs = """\
struct np {
int x;
Expand Down
10 changes: 10 additions & 0 deletions clang/test/3C/testgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
import find_bin
bin_path = find_bin.bin_path

# Change to the subdirectory after calling `find_bin` (which assumes a working
# directory of `clang/test/3C`) but before doing anything else.
subdir_name = "generated_tests"
# Since testgenerator deletes tests under some conditions and Git may delete
# empty directories, theoretically the directory might not exist and we might
# need to create it here.
if not os.path.isdir(subdir_name):
os.mkdir(subdir_name)
os.chdir(subdir_name)

prefixes = [
"arr", "arrstruct", "arrinstruct", "arrofstruct", "safefptrarg",
"unsafefptrarg", "fptrsafe", "fptrunsafe", "fptrarr", "fptrarrstruct",
Expand Down

0 comments on commit 81cbd4c

Please sign in to comment.