Add check section to run tests
This commit is contained in:
parent
cb6936631b
commit
c64a2302fe
26
glslang.spec
26
glslang.spec
@ -5,7 +5,7 @@
|
||||
|
||||
Name: glslang
|
||||
Version: 3.1
|
||||
Release: 0.1%{?gitrel}%{?dist}
|
||||
Release: 0.2%{?gitrel}%{?dist}
|
||||
Summary: OpenGL and OpenGL ES shader front end and validator
|
||||
|
||||
License: BSD and GPLv3+ and ASL 2.0
|
||||
@ -13,6 +13,7 @@ URL: https://github.com/KhronosGroup
|
||||
Source0: %url/%{name}/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz
|
||||
Patch0: nodate.patch
|
||||
Patch1: glslang-default-resource-limits_staticlib.patch
|
||||
Patch2: glslang_tests.patch
|
||||
|
||||
BuildRequires: cmake3
|
||||
BuildRequires: gcc-c++
|
||||
@ -24,6 +25,7 @@ interpretation of the specifications for these languages.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
%{name} is the official reference compiler front end for the OpenGL
|
||||
@ -36,8 +38,8 @@ interpretation of the specifications for these languages.
|
||||
find . -name '*.h' -or -name '*.cpp' -or -name '*.hpp'| xargs chmod a-x
|
||||
|
||||
%build
|
||||
%__mkdir_p %_target_platform
|
||||
pushd %_target_platform
|
||||
%__mkdir_p build
|
||||
pushd build
|
||||
%cmake3 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=yes ..
|
||||
@ -45,16 +47,22 @@ pushd %_target_platform
|
||||
popd
|
||||
|
||||
%install
|
||||
%{make_install} -C %_target_platform
|
||||
%{make_install} -C build
|
||||
|
||||
%check
|
||||
pushd Test
|
||||
./runtests
|
||||
popd
|
||||
|
||||
# Install .so file
|
||||
install -pm 0644 %_target_platform/StandAlone/libglslang-default-resource-limits.a %{buildroot}%{_libdir}/
|
||||
# Install libglslang-default-resource-limits.a
|
||||
install -pm 0644 build/StandAlone/libglslang-default-resource-limits.a %{buildroot}%{_libdir}/
|
||||
|
||||
%files devel
|
||||
%files
|
||||
%doc README.md README-spirv-remap.txt
|
||||
%{_bindir}/glslangValidator
|
||||
%{_bindir}/spirv-remap
|
||||
|
||||
%files devel
|
||||
%{_includedir}/SPIRV/
|
||||
%{_includedir}/glslang/
|
||||
%{_libdir}/libHLSL.a
|
||||
@ -66,6 +74,10 @@ install -pm 0644 %_target_platform/StandAlone/libglslang-default-resource-limits
|
||||
%{_libdir}/libglslang-default-resource-limits.a
|
||||
|
||||
%changelog
|
||||
* Wed Jan 03 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.2.20171028.git715c353
|
||||
- Add check section to run tests
|
||||
- Split binaries into main package
|
||||
|
||||
* Thu Jul 13 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.1.20171028.git715c353
|
||||
- First build
|
||||
|
||||
|
21
glslang_tests.patch
Normal file
21
glslang_tests.patch
Normal file
@ -0,0 +1,21 @@
|
||||
--- glslang-715c353a15836e5ae192a64a4cf54e2ce7e8d66a/Test/runtests
|
||||
+++ glslang-715c353a15836e5ae192a64a4cf54e2ce7e8d66a-new/Test/runtests
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
TARGETDIR=localResults
|
||||
BASEDIR=baseResults
|
||||
-EXE=../build/install/bin/glslangValidator
|
||||
-REMAPEXE=../build/install/bin/spirv-remap
|
||||
+EXE=../build/StandAlone/glslangValidator
|
||||
+REMAPEXE=../build/StandAlone/spirv-remap
|
||||
HASERROR=0
|
||||
mkdir -p localResults
|
||||
|
||||
|
||||
--- glslang-715c353a15836e5ae192a64a4cf54e2ce7e8d66a/Test/glslangValidator
|
||||
+++ glslang-715c353a15836e5ae192a64a4cf54e2ce7e8d66a-new/Test/glslangValidator
|
||||
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
-../build/install/bin/glslangValidator $*
|
||||
+../build/StandAlone/glslangValidator $*
|
||||
|
Loading…
Reference in New Issue
Block a user