Skip to content

Latest commit

 

History

History
executable file
·
32 lines (19 loc) · 1.36 KB

File metadata and controls

executable file
·
32 lines (19 loc) · 1.36 KB

A test rule that compares two binary files.

The rule uses a Bash command (diff) on Linux/macOS/non-Windows, and a cmd.exe command (fc.exe) on Windows (no Bash is required).

diff_test

load("@bazel_skylib//rules:diff_test.bzl", "diff_test")

diff_test(name, failure_message, file1, file2)

A test that compares two files.

The test succeeds if the files' contents match.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
failure_message Additional message to log if the files' contents do not match. String optional ""
file1 Label of the file to compare to file2. Label required
file2 Label of the file to compare to file1. Label required