dimanche 17 septembre 2017

go test in complex folder structure

I am building a repository of design patterns in golang. To run all tests, I use this bash script. It works.

#!/bin/bash
go test creational/abstract_factory/*.go
go test creational/builder/*.go
go test creational/factory/*.go
go test creational/pool/*.go
go test creational/prototype/*.go
go test creational/singleton/*.go

It works fine:

prompt> ./runtests.sh
ok      command-line-arguments  0.006s
ok      command-line-arguments  0.006s
ok      command-line-arguments  0.006s
ok      command-line-arguments  0.006s
ok      command-line-arguments  0.005s
ok      command-line-arguments  0.006s

But, ... If I try to send more directory to go test I receive this message "named files must all be in one directory; have creational/pool/ and creational/factory/". This is the reason I've created that bash script.

Is there the possibility to test all folder in one single command?

Aucun commentaire:

Enregistrer un commentaire