Fix and reorganize CI tests

This commit is contained in:
sergesanspaille 2019-02-01 15:04:19 +00:00
parent dc88066dc2
commit 734d45aa8f
7 changed files with 41 additions and 42 deletions

View File

@ -58,7 +58,7 @@
Name: %pkg_name
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 4%{?rc_ver:.rc%{rc_ver}}%{?dist}
Release: 5%{?rc_ver:.rc%{rc_ver}}%{?dist}
Summary: A C language family front-end for LLVM
License: NCSA
@ -422,6 +422,9 @@ false
%endif
%changelog
* Tue Feb 05 2019 sguelton@redhat.com - 7.0.1-5
- Working CI test suite
* Mon Feb 04 2019 sguelton@redhat.com - 7.0.1-4
- Workaround gcc-9 bug when compiling bitfields

View File

@ -1,32 +0,0 @@
# This is separate from tests.yml because we want to run the tests without
# clang installed.
# FIXME: Is there some way we can put this yaml definition in the tests/pocl
# repo? Right now we need to copy and paste this everywhere the test is run.
- hosts: localhost
pre_tasks:
# Programs linked against pocl should be able to run without clang installed,
# so when we run the test we want to make sure clang is not installed to
# verify we haven't introduced an implicit dependency on clang.
- name: Uninstall clang
package:
name: clang
state: absent
tags: classic
roles:
- role: standard-test-basic
tags:
- classic
repositories:
- repo: "https://src.fedoraproject.org/tests/pocl.git"
dest: "pocl"
required_packages:
- ocl-icd-devel
- pocl
- gcc
tests:
# rhbz#1582884
- simple-opencl-no-clang:
dir: pocl/simple-opencl-no-clang
run: ./runtest.sh

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
set -x
cp -r /usr/share/llvm-test-suite/ABI-Testsuite .
cd ABI-Testsuite
python3 linux-x86.py clang test -v --path /usr/lib64/llvm/ -j 1

View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
set -x
cmake -G Ninja /usr/share/llvm-test-suite/ -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DTEST_SUITE_LIT_FLAGS="-svj1"
ninja -j 1 check

View File

@ -0,0 +1,15 @@
#include <charconv>
#include <iostream>
#include <cstring>
using namespace std;
int main(int argc, char **argv)
{
size_t r=0;
const char *begin = argv[1];
const char *end = begin + strlen(begin);
from_chars(begin, end, r);
cout << r << '\n';
return 0;
}

6
tests/rhbz_1657544/runtest.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
set -x
clang++ from_chars.cpp
./a.out 100 | grep 100

View File

@ -12,12 +12,6 @@
- rhbz#482491:
dir: ./
run: echo "int main(){}" | clang -x c -
- llvm-test-suite:
dir: ./
run: cd $(mktemp -d) && cmake -G Ninja /usr/share/llvm-test-suite/ -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DTEST_SUITE_LIT_FLAGS="-svj1" && ninja -j 1 check
- llvm-abi-test-suite:
dir: ./
run: cd /usr/share/llvm-test-suite/ABI-Testsuite/ && python2 linux-x86.py clang test -v --path /usr/lib64/llvm/ -j 1
- rhbz#1657544:
dir: ./from_chars
run: clang++ from_chars.cpp && ./a.out 100 | grep 100
- llvm-test-suite
- llvm-abi-test-suite
- rhbz_1657544