diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d0a7214f6260d50c827e527493442b644879209f..5a8ce6056cf3f8a62b2d082d273d10eb4390e463 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,10 +38,7 @@ test-nvidia-gpu:
   stage: test
   script:
     - clinfo
-    - PLATFORMS=$(clinfo | grep "Number of platforms" | sed "s/Number of platforms[[:space:]]*\([0-9]*\)[^0-9]*/\1/g")
-    - if [ $PLATFORMS == "0" ]; then
-        exit -1;
-      fi
+    - if [[ "$(clinfo | grep 'Device Type')" != *"GPU"* ]]; then exit -1; fi
     - mvn $MAVEN_CLI_OPTS test
   tags:
     - opencl
@@ -51,9 +48,7 @@ test-nvidia-cpu:
   stage: test
   script:
     - clinfo
-    - if [ $PLATFORMS != "0" ]; then
-        exit -1;
-      fi
+    - if [[ "$(clinfo | grep 'Device Type')" == *"GPU"* ]]; then exit -1; fi
     - mvn $MAVEN_CLI_OPTS test
   tags:
     - compute
@@ -63,9 +58,7 @@ test-amdgpu-cpu:
   stage: test
   script:
     - clinfo
-    - if [ $PLATFORMS != "0" ]; then
-        exit -1;
-      fi
+    - if [[ "$(clinfo | grep 'Device Type')" == *"GPU"* ]]; then exit -1; fi
     - mvn $MAVEN_CLI_OPTS test
   tags:
     - compute
@@ -75,21 +68,17 @@ test-pocl-gpu:
   stage: test
   script:
     - clinfo
-    - if [ $PLATFORMS == "0" ]; then
-        exit -1;
-      fi
+    - if [[ "$(clinfo | grep 'Device Type')" != *"GPU"* ]]; then exit -1; fi
     - mvn $MAVEN_CLI_OPTS test
   tags:
     - opencl
 
-test-amdgpu-cpu:
+test-pocl-cpu:
   image: aparapi/aparapi-pocl:latest
   stage: test
   script:
     - clinfo
-    - if [ $PLATFORMS != "0" ]; then
-        exit -1;
-      fi
+    - if [[ "$(clinfo | grep 'Device Type')" == *"GPU"* ]]; then exit -1; fi
     - mvn $MAVEN_CLI_OPTS test
   tags:
     - compute