. "$BST_LIB" # spirv-headers is the machine-readable definition of SPIR-V -- the Khronos # intermediate language every shader compiler and every shader consumer targets. # It is PAYLOAD: 74 files, no binary, nothing to run. It is on this image # because spirv-tools (BRINTOS-1133) and glslang/shaderc (Epic BRINTOS-1097) # cannot be taken without it. # # WHAT THAT MAKES THIS SUITE'S PROBLEM. For a payload port "the files are # present" is the whole of what a shell test can say by itself, and it is a much # weaker claim than it reads as: a truncated install, a half-regenerated tree or # a header no compiler on this arm would accept all satisfy it. This suite is # built around the one property that CANNOT be satisfied by accident. # # THE PACKAGE STATES THE SAME REGISTRY EIGHT TIMES. Each of the four trees # (1.0/, 1.1/, 1.2/, unified1/) carries C, C++, C++11, C#, D, Beef, Lua and # Python spellings of one registry beside the JSON grammar all of them are # generated from. They are generated by one tool from one source, so they must # AGREE -- and a disagreement is invisible in any one file, because each is # internally consistent on its own. Four of the eight can be checked here, by # four independent routes: # # C and C++11 the compiled probe (section 6). It is a translation unit that # includes both, built at image-build time by the distro's own # C++ driver, so it also answers the question a file listing # cannot: did a compiler on THIS arm ever accept these bytes. # JSON grammar jq (section 3), which both parses every one of the 26 JSON # files and counts the instructions, the distinct opcodes and # the ones carrying a result. # Lua the shipped spv table, loaded by the image's own lua # (section 4) -- the only one of the remaining four bindings # this image has an interpreter for. # # Section 7 then compares those three sources to EACH OTHER rather than each to # a constant. Those cases are the point of the file: they hold at any upstream # revision, where every pinned number in sections 2-6 is a dated snapshot of # SRCREV 1c6bb274 and will move when the package is bumped. # # THREE DIFFERENT VERSION NUMBERS, and none of them equals another. Assert this # wrongly and the suite is asserting something false: # # 1.3.275.0 the recipe's PV -- a Vulkan SDK release tag. It appears in NONE # of the shipped bytes, so nothing here can check it. # 1.5.5 what SPIRV-Headers.pc and SPIRV-HeadersConfigVersion.cmake # carry: upstream's stale project(SPIRV-Headers VERSION 1.5.5). # This is what a consumer's find_package(SPIRV-Headers 1.6) would # be tested against, which is why it is pinned rather than # ignored. # 0x10600 r1 SPV_VERSION / SPV_REVISION in the headers -- the SPIR-V # SPECIFICATION version, 1.6 revision 1, which is the number that # describes the content and the one the grammar and the Lua table # restate. # # The port ticket asks that "the version macros in spirv.h match the recipe's # version". They do not and cannot: the macros carry the spec version and the PV # carries an SDK tag. Each of the three is pinned to its own source instead -- # which meets what the ticket was after (a bump is a changed number, not a # silent pass) without asserting a false equality. # # THE CMAKE PACKAGE IS CHECKED WHERE IT CAN BE. There is no cmake on this image, # so no case here can run find_package(). The recipe runs it at build time # against the tree it is about to package and leaves the verdict in # /usr/share/spirv-headers/CMAKE-STATE; section 5 reads that AND string-checks # the shipped config, because the two catch different things -- a config that # parses and names the right target can still fail to resolve. # # Not a brintOS defect anywhere in this port: spirv-headers is data and headers, # it needed no patch, and no BRINTOS-WORKAROUND marker exists in its recipe. # Nothing is filed against KhronosGroup/SPIRV-Headers for the 1.5.5, per # docs/conventions/no-public-upstream-reports.md. # # Fork discipline (the lesson 81-cjson paid for): the per-suite bound is a # budget in PROCESS SPAWNS, not in cases. The 26 JSON files are parsed by ONE jq # invocation that both validates them and emits the four grammars' numbers; the # eight headers are read by ONE grep; the file counts come from globs, which # fork nothing. Every case below is then a fork-free `case` glob or string # compare against those captures. Do not add a per-case grep or a per-file jq. inc=/usr/include/spirv state=/usr/share/spirv-headers/CMAKE-STATE pc=/usr/share/pkgconfig/SPIRV-Headers.pc cm=/usr/share/cmake/SPIRV-Headers probe=/usr/libexec/spirv-headers-tests/spirv-headers-probe data_lua=$BST_DATA/spirv-headers-lua.lua # has -- ok iff contains the literal . # eq -- ok iff the two strings are equal (check_eq's # argument order is ; this # wrapper takes them the way the cases read). # nonempty -- ok iff is a non-empty regular file. has() { case "$3" in *"$2"*) bst_ok "$1" ;; *) bst_notok "$1" "not found: $2" ;; esac; } eq() { check_eq "$1" "$3" "$2"; } nonempty() { if [ -s "$2" ]; then bst_ok "$1"; else bst_notok "$1" "absent or empty: $2"; fi; } # --------------------------------------------------------------------------- # 1. The payload, counted rather than listed. # # The counts ARE the assertion: a partial install drops files, and naming 74 of # them one stat() at a time would cost 74 forks to say the same thing less well. # The four trees are counted separately because they are four independent # snapshots -- 1.0, 1.1 and 1.2 are frozen historical registries and unified1 is # the live one, so a bump moves unified1's count and leaves the other three # alone, and a single total would hide which moved. if [ -d "$inc" ]; then bst_ok spirv-headers/include-dir else bst_notok spirv-headers/include-dir "absent: $inc"; fi set -- "$inc"/1.0/*; n10=$# set -- "$inc"/1.1/*; n11=$# set -- "$inc"/1.2/*; n12=$# set -- "$inc"/unified1/*; nu=$# set -- "$inc"/*/*.json; njson=$# eq spirv-headers/file-count-1.0 "$n10" 12 eq spirv-headers/file-count-1.1 "$n11" 12 eq spirv-headers/file-count-1.2 "$n12" 12 eq spirv-headers/file-count-unified1 "$nu" 34 eq spirv-headers/json-count "$njson" 26 nonempty spirv-headers/registry-xml "$inc/spir-v.xml" nonempty spirv-headers/header-c "$inc/unified1/spirv.h" nonempty spirv-headers/header-cpp "$inc/unified1/spirv.hpp" nonempty spirv-headers/header-cpp11 "$inc/unified1/spirv.hpp11" nonempty spirv-headers/grammar-core "$inc/unified1/spirv.core.grammar.json" nonempty spirv-headers/binding-lua "$inc/unified1/spirv.lua" nonempty spirv-headers/cmake-state "$state" nonempty spirv-headers/pc "$pc" nonempty spirv-headers/cmake-config "$cm/SPIRV-HeadersConfig.cmake" nonempty spirv-headers/cmake-version-file "$cm/SPIRV-HeadersConfigVersion.cmake" if [ -d "$cm" ]; then bst_ok spirv-headers/cmake-dir else bst_notok spirv-headers/cmake-dir "absent: $cm"; fi # Header-only: there is no library to link, and a stray one would mean something # built a SPIRV-Headers archive behind the port's back. if [ -e /usr/lib/libSPIRV-Headers.a ] || [ -e /usr/lib/libSPIRV-Headers.so ]; then bst_notok spirv-headers/no-library "unexpected libSPIRV-Headers on a headers-only package" else bst_ok spirv-headers/no-library; fi # --------------------------------------------------------------------------- # 2. The spec version each tree states, in both C and C++11. ONE grep pass over # eight files supplies every case here. # # Each tree states its version twice -- as a C macro and as a C++ constant -- # and they are written differently (0x10600 against 0x00010600) while being the # same number. Both spellings are pinned per tree, so a tree regenerated from # the wrong registry is a changed value rather than a silent pass, and the # C-vs-C++ agreement is checked by the compiled probe in section 6 where the two # can be compared as numbers instead of as text. vmarks=$(grep -H -E '^#define SPV_(VERSION|REVISION) |^static const unsigned int (Version|Revision) =' \ "$inc"/1.0/spirv.h "$inc"/1.1/spirv.h "$inc"/1.2/spirv.h "$inc"/unified1/spirv.h \ "$inc"/1.0/spirv.hpp11 "$inc"/1.1/spirv.hpp11 "$inc"/1.2/spirv.hpp11 "$inc"/unified1/spirv.hpp11 \ 2>/dev/null) has spirv-headers/c-version-1.0 "$inc/1.0/spirv.h:#define SPV_VERSION 0x10000" "$vmarks" has spirv-headers/c-revision-1.0 "$inc/1.0/spirv.h:#define SPV_REVISION 12" "$vmarks" has spirv-headers/c-version-1.1 "$inc/1.1/spirv.h:#define SPV_VERSION 0x10100" "$vmarks" has spirv-headers/c-revision-1.1 "$inc/1.1/spirv.h:#define SPV_REVISION 8" "$vmarks" has spirv-headers/c-version-1.2 "$inc/1.2/spirv.h:#define SPV_VERSION 0x10200" "$vmarks" has spirv-headers/c-revision-1.2 "$inc/1.2/spirv.h:#define SPV_REVISION 2" "$vmarks" has spirv-headers/c-version-unified1 "$inc/unified1/spirv.h:#define SPV_VERSION 0x10600" "$vmarks" has spirv-headers/c-revision-unified1 "$inc/unified1/spirv.h:#define SPV_REVISION 1" "$vmarks" has spirv-headers/cpp-version-1.0 "$inc/1.0/spirv.hpp11:static const unsigned int Version = 0x00010000;" "$vmarks" has spirv-headers/cpp-revision-1.0 "$inc/1.0/spirv.hpp11:static const unsigned int Revision = 12;" "$vmarks" has spirv-headers/cpp-version-1.1 "$inc/1.1/spirv.hpp11:static const unsigned int Version = 0x00010100;" "$vmarks" has spirv-headers/cpp-version-1.2 "$inc/1.2/spirv.hpp11:static const unsigned int Version = 0x00010200;" "$vmarks" has spirv-headers/cpp-version-unified1 "$inc/unified1/spirv.hpp11:static const unsigned int Version = 0x00010600;" "$vmarks" has spirv-headers/cpp-revision-unified1 "$inc/unified1/spirv.hpp11:static const unsigned int Revision = 1;" "$vmarks" # --------------------------------------------------------------------------- # 3. The 26 JSON files: well-formed, and the four core grammars counted. # # ONE jq invocation does both. It is given every JSON file, so a parse error in # ANY of them is a non-zero exit (measured: jq 1.7 exits 5 on malformed input, # whether it is the first file or the last), and its programme emits one summary # line for each file that carries a magic_number -- which is exactly the four # core grammars and none of the 22 extended-instruction-set grammars. # # The summary is the grammar's own account of itself: magic, major, minor, # revision, then the instruction count, the DISTINCT opcode count (which differs # from the first by the aliases the registry declares), the opcodes carrying a # result id, those carrying a result type, the highest opcode, and the number of # operand kinds. Those are the numbers sections 4, 6 and 7 compare against. gsum='' gjq_rc=0 if command -v jq >/dev/null 2>&1; then gsum=$(jq -r ' if has("magic_number") then [ input_filename, .magic_number, (.major_version|tostring), (.minor_version|tostring), (.revision|tostring), (.instructions|length|tostring), ([.instructions[].opcode]|unique|length|tostring), ([.instructions[]|select((.operands//[])|any(.kind=="IdResult"))|.opcode]|unique|length|tostring), ([.instructions[]|select((.operands//[])|any(.kind=="IdResultType"))|.opcode]|unique|length|tostring), ([.instructions[].opcode]|max|tostring), (.operand_kinds|length|tostring) ] | join(" ") else empty end' "$inc"/*/*.json 2>&1) gjq_rc=$? if [ "$gjq_rc" -eq 0 ]; then bst_ok spirv-headers/json-wellformed-all else # Only on failure is it worth 26 forks to say WHICH file. In the healthy # case this loop never runs. bad= for f in "$inc"/*/*.json; do jq -e . "$f" >/dev/null 2>&1 || bad="$bad ${f#$inc/}" done bst_notok spirv-headers/json-wellformed-all "jq rc=$gjq_rc malformed:$bad" fi # One case per core grammar, comparing the whole summary line at once: a # single changed number is then reported with the whole want/got pair beside # it, which is what makes it diagnosable from the console dump. printf '%s\n' "$gsum" | while read -r gpath grest; do case "$gpath" in */1.0/spirv.core.grammar.json) eq spirv-headers/grammar-1.0 "$grest" "0x07230203 1 0 12 321 321 265 241 5633 43" ;; */1.1/spirv.core.grammar.json) eq spirv-headers/grammar-1.1 "$grest" "0x07230203 1 1 8 331 331 273 247 5633 43" ;; */1.2/spirv.core.grammar.json) eq spirv-headers/grammar-1.2 "$grest" "0x07230203 1 2 2 332 332 273 247 5633 43" ;; */unified1/spirv.core.grammar.json) eq spirv-headers/grammar-unified1 "$grest" "0x07230203 1 6 1 724 713 606 558 6408 61" ;; esac done else bst_skip spirv-headers/json-wellformed-all "jq not installed on this image" for c in grammar-1.0 grammar-1.1 grammar-1.2 grammar-unified1; do bst_skip "spirv-headers/$c" "jq not installed on this image" done fi # unified1's fields, kept for the cross-source comparisons in section 7. The # glob orders unified1 last, so stripping everything up to and including its # path leaves that line's fields and nothing after them. gu=${gsum##*"/unified1/spirv.core.grammar.json "} case "$gu" in *" "*) : ;; # looks like a field list *) gu='' ;; # nothing matched; leave it empty esac g_instr='' ; g_opcodes='' ; g_result='' ; g_type='' ; g_max='' if [ -n "$gu" ]; then # shellcheck disable=SC2086 set -- $gu if [ $# -eq 10 ]; then g_instr=$5; g_opcodes=$6; g_result=$7; g_type=$8; g_max=$9 fi fi # --------------------------------------------------------------------------- # 4. The Lua binding, LOADED rather than looked at. # # spirv.lua is a Lua chunk, so loading it is itself an assertion no `test -s` # can make: a file cut short is a syntax error here. What it then reports is an # INDEPENDENT count of the same registry -- names in spv.Op, distinct values, # the highest -- generated from the same grammar by the same tool as the C # header. Section 7 compares them. # # The payload is passed the tree's spirv.lua as an argument, never redirected # from the rootfs: a top-level redirect out of the virtiofs root is how a suite # ends early while reporting a clean pass (brintos/linux#73). if command -v lua >/dev/null 2>&1; then if [ -f "$data_lua" ]; then bst_ok spirv-headers/lua-payload-staged else bst_notok spirv-headers/lua-payload-staged "absent: $data_lua"; fi lu10=$(lua "$data_lua" "$inc/1.0/spirv.lua" 2>&1) lu11=$(lua "$data_lua" "$inc/1.1/spirv.lua" 2>&1) lu12=$(lua "$data_lua" "$inc/1.2/spirv.lua" 2>&1) luu=$(lua "$data_lua" "$inc/unified1/spirv.lua" 2>&1) eq spirv-headers/lua-1.0 "$lu10" "SPVLUA magic=0x07230203 version=0x00010000 revision=12 mask=0xffff shift=16 tables=39 scalars=5 opnames=321 opvals=321 opmax=5633" eq spirv-headers/lua-1.1 "$lu11" "SPVLUA magic=0x07230203 version=0x00010100 revision=8 mask=0xffff shift=16 tables=39 scalars=5 opnames=331 opvals=331 opmax=5633" eq spirv-headers/lua-1.2 "$lu12" "SPVLUA magic=0x07230203 version=0x00010200 revision=2 mask=0xffff shift=16 tables=39 scalars=5 opnames=332 opvals=332 opmax=5633" eq spirv-headers/lua-unified1 "$luu" "SPVLUA magic=0x07230203 version=0x00010600 revision=1 mask=0xffff shift=16 tables=59 scalars=5 opnames=724 opvals=713 opmax=6408" # The frozen trees declare no aliases and unified1 declares eleven. That is a # property of the registry rather than of this install, so it survives a # version bump in a way the pinned counts above do not. case "$lu10" in *"opnames=321 opvals=321"*) bst_ok spirv-headers/lua-no-alias-1.0 ;; *) bst_notok spirv-headers/lua-no-alias-1.0 "1.0 should declare no opcode aliases: $(_bst_1line "$lu10")" ;; esac case "$luu" in *"opnames=724 opvals=713"*) bst_ok spirv-headers/lua-alias-unified1 ;; *) bst_notok spirv-headers/lua-alias-unified1 "unified1 should declare 11 opcode aliases: $(_bst_1line "$luu")" ;; esac else for c in lua-payload-staged lua-1.0 lua-1.1 lua-1.2 lua-unified1 lua-no-alias-1.0 lua-alias-unified1; do bst_skip "spirv-headers/$c" "lua not installed on this image" done luu='' fi l_names=''; l_vals=''; l_max='' case "$luu" in SPVLUA*) l_max=${luu##*opmax=} l_vals=${luu##*opvals=}; l_vals=${l_vals%% *} l_names=${luu##*opnames=}; l_names=${l_names%% *} ;; esac # --------------------------------------------------------------------------- # 5. The integration surface -- what a consumer actually resolves through. # # Both halves are here on purpose. The string cases below read the shipped # files; the CMAKE-STATE cases read the verdict of a REAL find_package() run at # build time against the tree that was packaged. A config that parses, names the # right target and still fails to resolve would pass every string case and fail # the first consumer, and there is no cmake on this image to catch that here. # # The version is pinned to 1.5.5 in both files -- upstream's stale project() # version, NOT the recipe's 1.3.275.0. See the header comment; this is the # number a consumer's find_package(SPIRV-Headers ) is compared against, so # it is the one that has to be pinned, however little it describes the content. pctext=$(cat "$pc" 2>/dev/null) has spirv-headers/pc-name 'Name: SPIRV-Headers' "$pctext" has spirv-headers/pc-version 'Version: 1.5.5' "$pctext" has spirv-headers/pc-cflags 'Cflags: -I${includedir}' "$pctext" has spirv-headers/pc-includedir 'includedir=/usr/include' "$pctext" cmtext=$(cat "$cm/SPIRV-HeadersConfig.cmake" "$cm/SPIRV-HeadersConfigVersion.cmake" 2>/dev/null) has spirv-headers/cmake-target 'add_library(SPIRV-Headers::SPIRV-Headers INTERFACE IMPORTED)' "$cmtext" has spirv-headers/cmake-interface 'INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"' "$cmtext" has spirv-headers/cmake-version 'set(PACKAGE_VERSION "1.5.5")' "$cmtext" # The config computes its prefix by walking up from its own location, so the # number of steps and the file's own directory have to match. Pinned because an # install that moved the config one level would still produce an EXISTING path, # just the wrong one -- which is the failure a bare `test -d` cannot see. has spirv-headers/cmake-prefix-walk 'get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)' "$cmtext" sttext=$(cat "$state" 2>/dev/null) has spirv-headers/cmake-control-ran 'spirv-headers-cmake-control:' "$sttext" has spirv-headers/cmake-control-resolved 'RESOLVED' "$sttext" has spirv-headers/cmake-control-version 'version=1.5.5' "$sttext" # `rel=include` is the whole point of the control: it is what the four-step # prefix walk above produced when a real find_package() resolved this package, # expressed relative to the prefix so it is the same string in every build. has spirv-headers/cmake-control-rel 'rel=include' "$sttext" # --------------------------------------------------------------------------- # 6. The compiled probe -- the only part of this suite that is not about bytes. # # It was built by the distro's C++ driver from the shipped C and C++11 headers # in the same build that installed them, so it is the answer to "did a compiler # on this arm ever accept these". It is run ONCE and every case below is a # fork-free match against that one output. # # The payload arrives non-executable (do_install ships it 0755 but the rootfs is # read-only at runtime, and the staging idiom is the same either way), so it is # copied to the writable /tmp tmpfs and given the bit there. if [ -f "$probe" ]; then bst_ok spirv-headers/probe-installed else bst_notok spirv-headers/probe-installed "absent: $probe"; fi tmp=${TMPDIR:-/tmp} pcopy=$tmp/bst-spirv-headers-probe.$$ pout='' if cp "$probe" "$pcopy" 2>/dev/null && chmod +x "$pcopy" 2>/dev/null; then pout=$("$pcopy" 2>&1); prc=$? if bst_execfail "$pout"; then bst_unrun spirv-headers/probe-run "$pout" elif [ "$prc" -eq 0 ]; then bst_ok spirv-headers/probe-run else bst_notok spirv-headers/probe-run "rc=$prc $(_bst_1line "$pout")" fi else bst_notok spirv-headers/probe-stage "cannot stage $probe at $pcopy" pout='' fi rm -f "$pcopy" has spirv-headers/probe-all-ok 'ALL-SPIRV-HEADERS-OK' "$pout" # Every case the probe emits, counted. A probe killed part-way through prints a # PREFIX of the OK lines and no ALL-SPIRV-HEADERS-OK -- but each individual # `has` below would still pass on whichever ones survived, so a short run would # read as a mostly-green section. The count is what makes it visible. # # 23 is measured, not counted by eye: the first draft of this case said 24 and # went red against a probe that was entirely correct. It is the reason the # number below is taken from a run rather than from reading the probe's source. nprobe=$(printf '%s\n' "$pout" | grep -c '^SPH-') eq spirv-headers/probe-case-count "$nprobe" 23 case "$pout" in *FAIL*) bst_notok spirv-headers/probe-no-fail "$(_bst_1line "$pout")" ;; *) bst_ok spirv-headers/probe-no-fail ;; esac # The individual findings, named so a red says which one moved rather than only # that the probe was unhappy. has spirv-headers/probe-magic 'SPH-magic OK 0x7230203' "$pout" has spirv-headers/probe-spec-version 'SPH-spv-version OK 0x10600' "$pout" has spirv-headers/probe-binding-agree 'SPH-binding-version-agree OK' "$pout" has spirv-headers/probe-static-pairs 'SPH-static-pairs OK 68' "$pout" has spirv-headers/probe-utility-mismatch 'SPH-utility-mismatch OK 0' "$pout" has spirv-headers/probe-utility-known 'SPH-utility-known OK 606' "$pout" has spirv-headers/probe-utility-highest 'SPH-utility-highest OK 6408' "$pout" has spirv-headers/probe-utility-type 'SPH-utility-with-type OK 558' "$pout" has spirv-headers/probe-type-implies-result 'SPH-utility-type-implies-result OK' "$pout" has spirv-headers/probe-shape-typeint 'SPH-shape-typeint OK' "$pout" has spirv-headers/probe-encode-word 'SPH-encode-word OK 0x40015' "$pout" # The three tallies the probe read out of the C header, kept for section 7. # $_BST_NL is bst.sh's own newline constant -- the cut has to be at the end of # the line, and a literal newline inside a ${..%%..} pattern is the kind of # thing that survives one shell and not the next. p_known=''; p_max=''; p_type='' probe_field() { case "$pout" in *"$1"*) _pf=${pout##*"$1"}; printf '%s' "${_pf%%"$_BST_NL"*}" ;; *) printf '' ;; esac } p_known=$(probe_field 'SPH-utility-known OK ') p_max=$(probe_field 'SPH-utility-highest OK ') p_type=$(probe_field 'SPH-utility-with-type OK ') # --------------------------------------------------------------------------- # 7. The three sources compared to EACH OTHER. # # This is what the file is for. Every number above is pinned to a constant, so # every one of those cases is a dated snapshot of SRCREV 1c6bb274 and goes red # the day the package is bumped -- correctly, but for a reason that says nothing # about whether the install is sound. These cases say the C header's switch, the # JSON grammar and the Lua table agree, and they hold at ANY revision. # # They are also the cases that catch the failure the port exists to prevent: a # tree that installed partially, or was regenerated from a different registry # than its siblings, disagrees here and nowhere else. if [ -n "$g_max" ] && [ -n "$l_max" ]; then eq spirv-headers/agree-max-grammar-lua "$l_max" "$g_max" else bst_skip spirv-headers/agree-max-grammar-lua "grammar or lua summary unavailable" fi if [ -n "$g_max" ] && [ -n "$p_max" ]; then eq spirv-headers/agree-max-grammar-probe "$p_max" "$g_max" else bst_skip spirv-headers/agree-max-grammar-probe "grammar or probe summary unavailable" fi if [ -n "$g_result" ] && [ -n "$p_known" ]; then eq spirv-headers/agree-result-grammar-probe "$p_known" "$g_result" else bst_skip spirv-headers/agree-result-grammar-probe "grammar or probe summary unavailable" fi if [ -n "$g_type" ] && [ -n "$p_type" ]; then eq spirv-headers/agree-resulttype-grammar-probe "$p_type" "$g_type" else bst_skip spirv-headers/agree-resulttype-grammar-probe "grammar or probe summary unavailable" fi if [ -n "$g_instr" ] && [ -n "$l_names" ]; then eq spirv-headers/agree-instr-grammar-lua "$l_names" "$g_instr" else bst_skip spirv-headers/agree-instr-grammar-lua "grammar or lua summary unavailable" fi if [ -n "$g_opcodes" ] && [ -n "$l_vals" ]; then eq spirv-headers/agree-opcodes-grammar-lua "$l_vals" "$g_opcodes" else bst_skip spirv-headers/agree-opcodes-grammar-lua "grammar or lua summary unavailable" fi # --------------------------------------------------------------------------- # 8. What is NOT covered, recorded as skips rather than omitted. # # Listed by name so a run states its own gap: a reader counting the passes above # should not conclude that more was exercised than was. bst_skip spirv-headers/consumer-compile-on-target \ "no C or C++ compiler on this image; the recipe's build-time probe (section 6) is what compiles the headers" bst_skip spirv-headers/find-package-on-target \ "no cmake on this image; the recipe's build-time find_package control (section 5, CMAKE-STATE) is what resolves the package" for b in csharp d beef python; do bst_skip "spirv-headers/binding-$b" \ "spirv.cs / spv.d / spirv.bf / spirv.py ship, but this image has no interpreter or compiler for them" done