gitlab-ci: Run piglit tests with llvmpipe

One job for the quick_gl profile, one for the glslparser & quick_shader
profiles (doing these together takes hardly any more time than
quick_shader alone).

v2:
* Don't break lava tests
v3:
* Remove piglit test artifacts paths:
* Exclude some quick_shader tests again:
  - Test whose result flips between pass/fail/skip
  - *@vs_in tests, as not the same one of these gets picked every time
v4:
* Do not list passing tests in .gitlab-ci/piglit/*.txt (Eric Anholt)
* Include the test number summary in .gitlab-ci/piglit/*.txt
* Completely disable generating any vs_in tests in the piglit build.
* Remove some more unneded files from the piglit build tree.
* Exclude quick_gl arb_gpu_shader5 tests; they were all skipped anyway,
  as llvmpipe doesn't support this extension yet, but occasionally they
  would spuriously fail instead.
v5:
* Set LD_LIBRARY_PATH, so we actually test the Mesa build from the
  pipeline...
* Verify that wflinfo reports the expected Mesa version
* Pass -noreset to Xvfb
v6:
* Don't use autoscale runners, run piglit with -j4 (Eric Anholt)

Reviewed-by: Eric Anholt <eric@anholt.net>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b76aad9..f4715b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -445,23 +445,17 @@
     - LLVM_VERSION=5.0 .gitlab-ci/scons-build.sh
 
 .test:
-  extends: .ci-run-policy
+  extends:
+    - .ci-run-policy
+    - .use-debian-10:amd64
   stage: test
   variables:
     GIT_STRATEGY: none # testing doesn't build anything from source
-
-.deqp-test:
-  extends:
-    - .test
-    - .use-debian-10:amd64
-  variables:
-    DEQP_SKIPS: deqp-default-skips.txt
-  script:
+  before_script:
     # Note: Build dir (and thus install) may be dirty due to GIT_STRATEGY
     - rm -rf install
     - tar -xf artifacts/install.tar
     - LD_LIBRARY_PATH=install/lib ldd install/lib/{*,dri/swrast_dri}.so
-    - ./artifacts/deqp-runner.sh
   artifacts:
     when: on_failure
     name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
@@ -473,6 +467,50 @@
     - meson-main
     - debian-10:amd64
 
+.piglit-test:
+  extends: .test
+  artifacts:
+    reports:
+      junit: results/results.xml
+  variables:
+    LIBGL_ALWAYS_SOFTWARE: 1
+    PIGLIT_NO_WINDOW: 1
+  script:
+    - artifacts/piglit/run.sh
+
+piglit-quick_gl:
+  extends: .piglit-test
+  variables:
+    LP_NUM_THREADS: 0
+    PIGLIT_OPTIONS: >
+      -x arb_gpu_shader5
+      -x glx-multithread-clearbuffer
+      -x glx-multithread-shader-compile
+      -x max-texture-size
+      -x maxsize
+    PIGLIT_PROFILES: quick_gl
+
+piglit-glslparser+quick_shader:
+  extends: .piglit-test
+  variables:
+    LP_NUM_THREADS: 1
+    PIGLIT_OPTIONS: >
+      -x spec@arb_arrays_of_arrays@execution@ubo
+      -x spec@arb_gpu_shader_int64@execution$$
+      -x spec@arb_separate_shader_objects@execution
+      -x spec@arb_separate_shader_objects@linker
+      -x spec@arb_shader_storage_buffer_object@execution
+      -x spec@glsl-1.50@execution@built-in-functions
+    PIGLIT_PROFILES: "glslparser quick_shader"
+    PIGLIT_RESULTS: "glslparser+quick_shader"
+
+.deqp-test:
+  extends: .test
+  variables:
+    DEQP_SKIPS: deqp-default-skips.txt
+  script:
+    - ./artifacts/deqp-runner.sh
+
 test-llvmpipe-gles2:
   parallel: 4
   variables: