Skip to content
Commit f7fdf6b5 authored by Jim Blandy's avatar Jim Blandy Committed by Dzmitry Malyshau
Browse files

Makefile: Be more flexible in removing YAML headers from snapshots.

The snapshot files in tests/out start with headers like this:

    ---
    source: tests/snapshots.rs
    expression: dis
    ---
    ; SPIR-V
    ; Version: 1.0
    ; Generator: rspirv
    ...

The Makefile's `validate-foo` targets trim off those lines with `tail -n +5`
before submitting their test to the validators.

However, some versions of the `insta` crate seem to generate headers with an
extra blank line, like this:

    ---
    source: tests/snapshots.rs
    expression: dis

    ---

This makes the `validate-foo` targets unhappy.

This commit changes the `validate-foo` targets to use `sed` to cope with both
kinds of headers.
parent 3f57e4db
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment