[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/vulkan/glslang][debian-unstable] d/tests: Add superficial autopkgtests



Title: GitLab

Timo Aaltonen pushed to branch debian-unstable at X Strike Force / vulkan / glslang

Commits:

3 changed files:

Changes:

  • debian/tests/control
    1
    +Tests: glslang-dev
    
    2
    +Restrictions: allow-stderr, superficial
    
    3
    +Depends:
    
    4
    + build-essential,
    
    5
    + glslang-dev,
    
    6
    +
    
    7
    +Tests: glslang-tools
    
    8
    +Restrictions: allow-stderr, superficial
    
    9
    +Depends:
    
    10
    + glslang-tools,

  • debian/tests/glslang-dev
    1
    +#!/bin/sh
    
    2
    +# Copyright  2019 Collabora Ltd.
    
    3
    +# SPDX-License-Identifier: MIT
    
    4
    +# (see debian/copyright)
    
    5
    +
    
    6
    +# Check that the library can be linked.
    
    7
    +
    
    8
    +set -e
    
    9
    +set -u
    
    10
    +set -x
    
    11
    +
    
    12
    +tempdir="$(mktemp -d)"
    
    13
    +cd "$tempdir"
    
    14
    +
    
    15
    +cat > trivial.cpp <<'EOF'
    
    16
    +#undef NDEBUG
    
    17
    +#include <cassert>
    
    18
    +
    
    19
    +#include <glslang/Public/ShaderLang.h>
    
    20
    +
    
    21
    +int main (void)
    
    22
    +{
    
    23
    +  ShHandle handle;
    
    24
    +  handle = ShConstructUniformMap();
    
    25
    +  ShDestruct(handle);
    
    26
    +  return 0;
    
    27
    +}
    
    28
    +EOF
    
    29
    +
    
    30
    +# This is hard-coded because there's no pkg-config, but that matches
    
    31
    +# what renderdoc does...
    
    32
    +c++ -std=c++11 -o trivial trivial.cpp -lglslang -lHLSL -lOGLCompiler -lOSDependent -lSPIRV -lpthread
    
    33
    +test -x trivial
    
    34
    +./trivial
    
    35
    +
    
    36
    +cd /
    
    37
    +rm -fr "$tempdir"

  • debian/tests/glslang-tools
    1
    +#!/bin/sh
    
    2
    +
    
    3
    +# Copyright  2019 Collabora Ltd.
    
    4
    +# SPDX-License-Identifier: MIT
    
    5
    +# (see debian/copyright)
    
    6
    +
    
    7
    +set -eux
    
    8
    +export LC_ALL=C.UTF-8
    
    9
    +
    
    10
    +# For now just check that the executables can run at all. They exit
    
    11
    +# unsuccessfully when asked for help, so screen-scrape the help...
    
    12
    +
    
    13
    +spirv-remap --help 2>&1 | tee "$AUTOPKGTEST_TMP/help"
    
    14
    +grep -q Usage: "$AUTOPKGTEST_TMP/help"
    
    15
    +
    
    16
    +glslangValidator --help 2>&1 | tee "$AUTOPKGTEST_TMP/help"
    
    17
    +grep -q Usage: "$AUTOPKGTEST_TMP/help"


  • Reply to: