Added sequential functionality (run tests on one device at a time)

Hello,

This is a pull request for doing a sequential execution (run tests device by device).
I used SquareAndroid code style with IntelliJ. 2 lines seem to have changed into SpoonRunner, but seem to respect your code style better (were modified before?).
I use an ExecutorService, constructed thanks to Executors.newSingleThreadExecutor().

The principle of the CountDownLatch is still intact, it simply runs on the ExecutorService if "sequential" is set to true, and runs on a normal Thread otherwise.

I modified both the SpoonRunner.Builder() and the RunMojo Maven Plugin to get the parameter (thanks to the argument --sequential or -Dsequential).

Cheers,

Olivier Goutay
Just push to the same branch. It will update this pull request.
On Sep 3, 2014 3:09 AM, "Olivier Goutay" <notifications@github.com> wrote:

> In spoon-runner/src/main/java/com/squareup/spoon/SpoonRunner.java:
>
> > @@ -155,11 +162,20 @@ private SpoonSummary runTests(AndroidDebugBridge adb, Set<String> serials) {
> >                    remaining);
> >              }
> >            }
> > -        }).start();
> > +        };
> > +
> > +        if (sequential) {
>
> You're right, I will refactor this and make a new pull request soon.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/square/spoon/pull/199/files#r17034095>.
>