From d5bdcba6cba73f3f359191b567386d16506bfbe8 Mon Sep 17 00:00:00 2001 From: Rot127 Date: Mon, 26 Aug 2024 06:29:57 -0500 Subject: [PATCH] Install and document FileCheck usage --- .github/workflows/auto-sync.yml | 4 ++++ suite/auto-sync/README.md | 6 +++--- tests/README.md | 5 +++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-sync.yml b/.github/workflows/auto-sync.yml index a6a56cdcfc..4c7f47a203 100644 --- a/.github/workflows/auto-sync.yml +++ b/.github/workflows/auto-sync.yml @@ -40,8 +40,11 @@ jobs: run: | sudo apt install llvm-18 llvm-mc-18 --version + FileCheck-18 --version sudo ln -s $(whereis -b llvm-mc-18 | grep -Eo "/.*") /usr/local/bin/llvm-mc + sudo ln -s $(whereis -b FileCheck-18 | grep -Eo "/.*") /usr/local/bin/FileCheck llvm-mc --version + FileCheck --version - name: Clone llvm-capstone run: | @@ -65,6 +68,7 @@ jobs: run: | sudo apt remove llvm-18 sudo rm /usr/local/bin/llvm-mc + sudo rm /usr/local/bin/FileCheck - name: Differ - Test save file is up-to-date run: | diff --git a/suite/auto-sync/README.md b/suite/auto-sync/README.md index 1d6d504ff1..7973209364 100644 --- a/suite/auto-sync/README.md +++ b/suite/auto-sync/README.md @@ -47,13 +47,13 @@ cmake --build . --target llvm-tblgen --config Debug cd ../../ ``` -#### Install `llvm-mc` +#### Install `llvm-mc` and `FileCheck` -Additionally, we need `llvm-mc` for generating our regression tests. +Additionally, we need `llvm-mc` and `FileCheck` to generate our regression tests. You can build it, but it will take a lot of space on your hard drive. You can also get the binaries [here](https://releases.llvm.org/download.html) or install it with your package manager (usually something like `llvm-18-dev`). -Just ensure it is in your `PATH` as `llvm-mc`. +Just ensure it is in your `PATH` as `llvm-mc` and `FileCheck` (not as `llvm-mc-18` or similar though!). ## Architecture diff --git a/tests/README.md b/tests/README.md index 6d59294f70..cae8519254 100644 --- a/tests/README.md +++ b/tests/README.md @@ -125,8 +125,9 @@ to the values for comparison. The `MCUpdater` translates most test files of the LLVM MC regression tests into our YAML files. The LLVM regression tests, check the bytes and assembly for all instructions of an architecture. -They do it by passing bytes or assembly to the `llvm-mc` tool and compare the output. -We capture this output and process it into YAML. So you need to install `llvm-mc` for our updater to work. +They do it by passing bytes or assembly to the `llvm-mc` and `FileCheck` tool and compare the output. +We capture this output and process it into YAML. +So you need to install `llvm-mc` and `FileCheck` for our updater to work. To update the YAML MC regression tests, you need to install `Auto-Sync` and run the `MCUpdater`.