Re: [PATCH] Always organize test artifacts in a directory hierarchy

Pedro Alves
2016-01-12T13:00:06Z

On 01/08/2016 03:51 PM, Simon Marchi wrote:
> When running tests in parallel, each test puts its generated files in a
> different directory, under "testsuite/outputs":
>
> outputs
> â”œâ”€â”€ gdb.base
> â”‚ â”œâ”€â”€ break
> â”‚ â”œâ”€â”€ whatis
> â”‚ â””â”€â”€ ...
> â”œâ”€â”€ gdb.python
> â”‚ â”œâ”€â”€ py-type
> â”‚ â”œâ”€â”€ py-value
> â”‚ â””â”€â”€ ...
> â””â”€â”€ ...
>
> I think it would be nice if it was always organized like this, even in
> serial mode, as it would isolate the test cases a bit more. An artifact
> created by a test wouldn't get overwritten by another test. It would be
> clear which test produced which files.
>

Yao posted a patch that moved sequential runs to a subdir as well:

https://sourceware.org/ml/gdb-patches/2014-12/msg00236.html

Though I think I too prefer making sequential/parallel the same.

You should cross check your patch with yours. For e.g., don't you
need to mkdir -p the outputs/ dir for the first time?

> It would also make it easier to clean up. Currently, make clean in the
> testsuite is broken. A lot of executables are left all over the place
> because their names do not appear in gdb.*/Makefile. If everything is
> in "outputs", then we just have to delete that directory (which we
> already do).
>
> At the same time it makes the gdb.foo directories and their Makefiles
> useless in the build directory, since they are pretty much only used for
> cleaning.

Yeah, I think we all agreed to this in the past.

>
> Note: the performance testsuite still produces some files in gdb.perf.
> If this is accepted, we can always look at that later.

Agreed.

>
> What do you think?

I like this.

Thanks,
Pedro Alves