[cfe-dev] RFC: structure of test/ASTMerge/Inputs

Sean Callanan via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 7 13:47:11 PST 2016


Aleksei Sidorin recently suggested that the layout of test/ASTMerge/Inputs is not very pretty, and I agree.  When tests become more complicated than the traditional structure

a.c
Inputs/a1.c
Inputs/a2.c

then it gets harder to tell the inputs for one testcase from the inputs for another.  There are a couple of solutions.  I list them in order of my decreasing preference:

- a.c-Inputs/*
	This would eliminate the global Inputs directory altogether and have a clearly-named input directory for each individual test.
	It will make it very quick to recognize and navigate to the inputs for a test.
- Inputs/a.c/*
	This would keep inputs in their own directory, but further sequester them into test-specific directories.  
	This means you get a cleaner view of the test case files themselves, although especially for ASTMerge they're not terribly useful by themselves.
	It also means you can possibly have files in Inputs/ that are common to multiple tests.  Personally I feel this can lead to bloat and interdependencies.
- The status quo, with better naming
	This would keep a flat structure for Inputs/, with filenames sharing a prefix with their test file.  With more complicated tests, or if files need to have specific names, this can be problematic.

I'm planning to introduce a diff for this this week, and currently I'm planning to adopt the a.c-Inputs/ scheme.  Please let me know if there's something I haven't considered that would argue for a different approach.

Sean



More information about the cfe-dev mailing list