From fad03704c9de7fcbd6e81d041ef440e85f2409e8 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 18 May 2021 15:01:13 +0200 Subject: [PATCH] Use llvm integration test suite --- tests/integration-test-suite/runtest.sh | 38 +++++++++++++++++++++++++ tests/tests.yml | 16 +++++++++++ 2 files changed, 54 insertions(+) create mode 100755 tests/integration-test-suite/runtest.sh diff --git a/tests/integration-test-suite/runtest.sh b/tests/integration-test-suite/runtest.sh new file mode 100755 index 0000000..1af4e4a --- /dev/null +++ b/tests/integration-test-suite/runtest.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +usage() { + echo "usage `basename $0` [OPTIONS]" + echo " --threads NUM The number of threads to use for running tests." +} + +thread_args="" +repo_url=https://github.com/opencollab/llvm-toolchain-integration-test-suite + +while [ $# -gt 0 ]; do + case $1 in + --threads) + shift + threads="$1" + ;; + * ) + echo "unknown option: $1" + echo "" + usage + exit 1 + ;; + esac + shift +done + +if [ -n "$threads" ]; then + thread_args="-j$threads" +fi + +set -xe + +cd $(mktemp -d -p /var/tmp) +git clone $repo_url +cd llvm-toolchain-integration-test-suite +mkdir _build && cd _build +cmake .. -GNinja +ninja $thread_args check diff --git a/tests/tests.yml b/tests/tests.yml index 8bc1fc9..d5da6f2 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -8,6 +8,21 @@ - clang - gcc - lld-test + # the requirements below are for the integration suite + - cmake + - llvm-devel + - clang + - clang-analyzer + - clang-tools-extra + - compiler-rt + - ninja-build + - libcxx-devel + - libomp-devel + - python-lit + - lld + - lldb + - git + - make tests: - basic: dir: ./ @@ -16,3 +31,4 @@ dir: ./ run: echo "int main(){ return 0; }" | gcc -x c -fuse-ld=lld - - lit-tests + - integration-test-suite