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

Bug#940488: marked as done (glslang: add autopkgtest smoke-tests)



Your message dated Mon, 18 Jan 2021 10:57:08 +0000
with message-id <YAVphL2NqrzUoWBw@espresso.pseudorandom.co.uk>
and subject line Re: Bug#940488: glslang: add autopkgtest smoke-tests
has caused the Debian Bug report #940488,
regarding glslang: add autopkgtest smoke-tests
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
940488: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=940488
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: glslang
Version: 7.10.2984-1
Severity: wishlist
Tags: patch

While backporting glslang to an older Debian derivative, I wanted to check
that the backport was basically functional, so I added simple autopkgtests.
Please consider adding something similar.

I attach the patch I used, but I'm sure a more realistic smoke-test (like
making the tools actually compile a shader, not just show help) would
be straightforward for someone who knows this package better than I do!

Thanks,
    smcv
>From d7cdbaa1f73f5dae468f1ad3dcbe4dae80a4e4ea Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Thu, 12 Sep 2019 19:36:12 +0100
Subject: [PATCH] d/tests: Add superficial autopkgtests

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 debian/tests/control       |  9 +++++++++
 debian/tests/glslang-dev   | 37 +++++++++++++++++++++++++++++++++++++
 debian/tests/glslang-tools | 17 +++++++++++++++++
 3 files changed, 63 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100755 debian/tests/glslang-dev
 create mode 100755 debian/tests/glslang-tools

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 00000000..b40ee0ea
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,9 @@
+Tests: glslang-dev
+Restrictions: allow-stderr, superficial
+Depends:
+ glslang-dev,
+
+Tests: glslang-tools
+Restrictions: allow-stderr, superficial
+Depends:
+ glslang-tools,
diff --git a/debian/tests/glslang-dev b/debian/tests/glslang-dev
new file mode 100755
index 00000000..9cb42d7e
--- /dev/null
+++ b/debian/tests/glslang-dev
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright © 2019 Collabora Ltd.
+# SPDX-License-Identifier: MIT
+# (see debian/copyright)
+
+# Check that the library can be linked.
+
+set -e
+set -u
+set -x
+
+tempdir="$(mktemp -d)"
+cd "$tempdir"
+
+cat > trivial.cpp <<'EOF'
+#undef NDEBUG
+#include <cassert>
+
+#include <glslang/Public/ShaderLang.h>
+
+int main (void)
+{
+  ShHandle handle;
+  handle = ShConstructUniformMap();
+  ShDestruct(handle);
+  return 0;
+}
+EOF
+
+# This is hard-coded because there's no pkg-config, but that matches
+# what renderdoc does...
+c++ -std=c++11 -o trivial trivial.cpp -lglslang -lHLSL -lOGLCompiler -lOSDependent -lSPIRV -lpthread
+test -x trivial
+./trivial
+
+cd /
+rm -fr "$tempdir"
diff --git a/debian/tests/glslang-tools b/debian/tests/glslang-tools
new file mode 100755
index 00000000..2445c3ca
--- /dev/null
+++ b/debian/tests/glslang-tools
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Copyright © 2019 Collabora Ltd.
+# SPDX-License-Identifier: MIT
+# (see debian/copyright)
+
+set -eux
+export LC_ALL=C.UTF-8
+
+# For now just check that the executables can run at all. They exit
+# unsuccessfully when asked for help, so screen-scrape the help...
+
+spirv-remap --help 2>&1 | tee "$AUTOPKGTEST_TMP/help"
+grep -q Usage: "$AUTOPKGTEST_TMP/help"
+
+glslangValidator --help 2>&1 | tee "$AUTOPKGTEST_TMP/help"
+grep -q Usage: "$AUTOPKGTEST_TMP/help"
-- 
2.23.0


--- End Message ---
--- Begin Message ---
Version: 7.13.3496-2

On Mon, 16 Sep 2019 at 12:26:40 +0100, Simon McVittie wrote:
> While backporting glslang to an older Debian derivative, I wanted to check
> that the backport was basically functional, so I added simple autopkgtests.
> Please consider adding something similar.

This was added in 7.13.3496-2. Unfortunately the autopkgtest now fails
(see #980369), but this particular bug is resolved.

A similar autopkgtest would be useful for #951988, and I've proposed a
patch there (but unfortunately I was unable to get it to pass).

    smcv

--- End Message ---

Reply to: