PointCloudLibrary/pcl — pull request #447 by taketwo (2014-01-15 19:34:23+00:00)
Title: Split Travis task into build and test

Travis builds often fail because of the 50-minutes timeout. Typically, `clang` manages to build the project, however does not have enough time to run all the tests. The situation with `gcc` is even worse as it seldom manages to finish compilation in 50 minutes.

This pull requests splits Travis task into two parts: building and testing, which allows either one to fit the time limit. In the "build" task global tests are disabled, which reduces the number of targets, so that even `gcc` is able to compile everything else in time. In the "test" task only `clang` is used and only the tests and their dependencies are built. Furthermore, the `PCL_NO_PRECOMPILE` flag is set.

This pull requests overlaps with #412 in that it also restructures .travis.yml and adds .travis.sh. As soon as either of these pull requests gets merged I will update the other one.

There is a weird sequence of `make` calls in the function that implements "test" run:

```sh
# Build and run tests
make pcl_registration -j3
make pcl_filters -j3
make test_registration
make test_filters
make tests -j3
```

It turned out that Travis fails to build 'test_registration' and 'test_filters' targets when there are several parallel jobs and no pre-compilation. The reason is that these test cases are so huge that compiler runs out of memory. Apparently, a better solution would be to split them into several parts, but that is a separate issue anyways.