[cfe-dev] RFC: structure of test/ASTMerge/Inputs
Sean Callanan via cfe-dev
cfe-dev at lists.llvm.org
Mon Nov 7 17:33:15 PST 2016
I like this option even more, because it allows the test's name to be entirely independent from the name of the main file.
Usually, you'll want to have the same name, but I could conceive of situations where the main file might need to be named something special.
I'd put your recommendation as my most favorite, with the caveat that I would generally discourage a "common" directory to avoid interdependencies.
Sean
> On Nov 7, 2016, at 2:06 PM, Alexey Sidorin <alexey.v.sidorin at ya.ru> wrote:
>
> Thank you, Sean.
>
> There is also another option which eliminates Input:
>
> test-name/{main.c,other-files.c}
> common/
>
> Example:
> exprs-c/{main.c,from.c,to.c}
> exprs-cxx/{main.cpp,from.cpp,to.cpp}
> ctors/{main.c,from.c,to.c}
> common/{stl-like-header.h,system-include.h}
> etc.
>
>
> 08.11.2016 00:47, Sean Callanan via cfe-dev пишет:
>> 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
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
More information about the cfe-dev
mailing list