For reference, the structure is as follows.

test
  my_test_a
  my_test_b
  my_test_c
  ...

Each my_test_a can be named in any way, so I can't use an if on them. Every 
my_test_x may contain arbitrary subdirectories.

On Thursday, August 6, 2015 at 5:26:37 PM UTC+2, Bourgond Aries wrote:
>
> I have a directory structure and each directory contains a test.
> The tests have the same files, so I want a Tupdefault in the
> top folder. This will make me not write a new Tupfile.lua for
> each test.
>
> That works, the only problem is that Tupdefault.lua also runs
> on the "root" directory and expects certain files. So I solved 
> that using
>
> ```
> local dir = tup.getdirectory()
> if dir != "test" then
>    --- code for each test
> end
> ```
>
> But, there are also subdirectories in the tests! Again:
> ```
> local dir = tup.getdirectory()
> if dir != "test" and dir != "subdir" then
>     --- code for each test
> end
> ``` 
>
> This feels very hacky and whenever I would like to add a sub-directory,
> I need to add it to this Tupfile. Is there a way to specify "Run this tup 
> file
> only on the direct children of the folder where it is defined, and no 
> more"?
>
> I realize one can probably use a Tupfile.lua, but how would you loop
> over each directory?
>

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to