Skip to content

Commit 1ee04dc

Browse files
authored
Update prepare-db-upgrade.md
Clarify the test steps based on my experience, where I got a "database may be too new" error when the `--search-path=<codeql-root>` directory was not specified.
1 parent 3304e9f commit 1ee04dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/prepare-db-upgrade.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ Although we have some automated testing of the scripts (e.g. to test that you ca
6969
To test the upgrade script, run:
7070

7171
```
72-
codeql test run --search-path=<old-extractor-pack> --search-path=ql <test-dir>
72+
codeql test run --search-path=<old-extractor-pack> --search-path=<codeql-root> <test-dir>
7373
```
7474

75-
Where `<old-extractor-pack>` is an extractor pack containing the old extractor and dbscheme that pre-date your changes, and `<test-dir>` is the directory containing the qltests for your language. This will run the tests using an old extractor, and the test databases will all be upgraded in place using your new upgrade script.
75+
Where `<old-extractor-pack>` is an extractor pack containing the old extractor and dbscheme that pre-date your changes, `<test-dir>` is the directory containing the qltests for your language, and `<codeql-root>` is the root directory directory of the `github/codeql` clone that contains `<test-dir>`. This will run the tests using an old extractor, and the test databases will all be upgraded in place using your new upgrade script.
7676

7777
To test the downgrade script, create an extractor pack that includes your new dbscheme and extractor changes. Then checkout the `main` branch of `codeql` (i.e. a branch that does not include your changes), and run:
7878

0 commit comments

Comments
 (0)