Skip to content

Commit

Permalink
Install and document FileCheck usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Aug 26, 2024
1 parent 3c70410 commit d5bdcba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/auto-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions suite/auto-sync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down

0 comments on commit d5bdcba

Please sign in to comment.