Skip to content

Commit af8e710

Browse files
committed
Use local repository for integration tests instead of remote v1.3.4
Integration tests were using the remote repository at v1.3.4, which meant they were testing old code and not reflecting any changes made to the local codebase. This explains why iwyu integration tests kept failing - they were testing an old version that didn't have the compile_commands.json fixes. Changed to use the local repository root at HEAD so integration tests actually test the current code being developed.
1 parent cc1ae4e commit af8e710

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ def integration_test(cmd_name, files, args, test_dir):
121121
run_in(["git", "add"] + files + [compile_db], test_dir)
122122
args = list(args) # redeclare so there's no memory weirdness
123123
pre_commit_config_path = os.path.join(test_dir, ".pre-commit-config.yaml")
124+
# Use local repository to test current code, not remote v1.3.4
125+
repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
124126
pre_commit_config = f"""\
125127
repos:
126-
- repo: https://github.com/pocc/pre-commit-hooks
127-
rev: v1.3.4
128+
- repo: {repo_root}
129+
rev: HEAD
128130
hooks:
129131
- id: {cmd_name}
130132
args: {args}

0 commit comments

Comments
 (0)