CPU only tests

To enable running the tests on machines with only the CPU, the GPU related codes have to be separated. 

Related issue: #468
Why did was this test dropped?