ci: Add check to compile with clang+fuzzer

v2: Fix shell handling

v3: - Use ci job template for build checks
    - rename clang_fuzzer result dir
      (Both suggested by Lepton Wo)

v4: - ci Unify all tests
    - Fix directory (Lepton Wu)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
macos/master
Gert Wollny 5 years ago
parent 080918e376
commit fe85f247d6
  1. 64
      ci/.gitlab-ci.yml
  2. 28
      ci/run_tests.sh

@ -60,8 +60,8 @@ build docker image:
paths:
- results/
make check:
stage: sanity test
.tests_base:
services:
- docker:dind
before_script:
@ -72,7 +72,7 @@ make check:
$RD_CONFIG
-v $PWD:/virglrenderer
$CI_REGISTRY_IMAGE@$DOCKER_IMAGE_DIGEST
bash -c "/virglrenderer/ci/run_tests.sh --make-check"
bash -c "/virglrenderer/ci/run_tests.sh $TEST_SUITE"
- echo -e "\nThat's all folks\n"
only:
- branches
@ -85,54 +85,28 @@ make check:
paths:
- results/
make check meson:
.make_check_base:
stage: sanity test
services:
- docker:dind
before_script:
*docker-setup
script:
- docker run
--ulimit core=99999999999:99999999999
$RD_CONFIG
-v $PWD:/virglrenderer
$CI_REGISTRY_IMAGE@$DOCKER_IMAGE_DIGEST
bash -c "/virglrenderer/ci/run_tests.sh --make-check-meson"
- echo -e "\nThat's all folks\n"
only:
- branches
- tags
- merge_requests
- schedules
extends: .tests_base
artifacts:
when: always
paths:
- results/
make check:
variables:
TEST_SUITE: '--make-check'
extends: .make_check_base
mesa check meson:
variables:
TEST_SUITE: '--make-check-meson'
extends: .make_check_base
make check clang-fuzzer:
variables:
TEST_SUITE: '--make-check-clang-fuzzer'
extends: .make_check_base
.tests:
stage: test
services:
- docker:dind
before_script:
*docker-setup
script:
- docker run
--ulimit core=99999999999:99999999999
$RD_CONFIG
-v $PWD:/virglrenderer
$CI_REGISTRY_IMAGE@$DOCKER_IMAGE_DIGEST
bash -c "/virglrenderer/ci/run_tests.sh $TEST_SUITE"
- echo -e "\nThat's all folks\n"
only:
- merge_requests
- schedules
artifacts:
when: always
paths:
- results/
extends: .tests_base
piglit - gl host:
variables:

@ -6,6 +6,10 @@ run_setup()
use_meson=$1
if [ "x$2" = "xfuzzer" ]; then
use_clang_fuzzer=1
fi
# Let .gitlab-ci or local ci runner set
# desired thread count
NUM_THREADS=${NUM_THREADS:-$(expr $(expr $(nproc) / 8) + 1)}
@ -56,7 +60,12 @@ run_setup()
if [ -d "$VIRGL_PATH" ]; then
cd $VIRGL_PATH
mkdir build
meson build/ -Dprefix=/usr/local -Ddebug=true -Dtests=true --fatal-meson-warnings
if [ "x$use_clang_fuzzer" = "x1" ]; then
CC=clang-8
FUZZER=-Dfuzzer=true
fi
meson build/ -Dprefix=/usr/local -Ddebug=true -Dtests=true --fatal-meson-warnings $FUZZER
ninja -C build -j$NUM_THREADS install
fi
fi
@ -91,6 +100,19 @@ run_make_check_meson()
)
}
run_make_check_clang_fuzzer()
{
run_setup meson fuzzer
(
cd /virglrenderer/build
mkdir -p /virglrenderer/results/make_check_clang_fuzzer
VRENDTEST_USE_EGL_SURFACELESS=1 ninja -j$NUM_THREADS test
RET=$?
cp /virglrenderer/build/meson-logs/testlog.txt /virglrenderer/results/make_check_clang_fuzzer/
return $RET
)
}
run_deqp()
{
run_setup meson
@ -170,6 +192,10 @@ parse_input()
run_make_check_meson
;;
--make-check-clang-fuzzer)
run_make_check_clang_fuzzer
;;
--deqp-gl-gl-tests)
run_deqp gl gl
;;

Loading…
Cancel
Save