Skip to content

Add Windows integration tests showing that subst is handled inconsistently#22087

Open
jketema wants to merge 1 commit into
github:mainfrom
jketema:subst
Open

Add Windows integration tests showing that subst is handled inconsistently#22087
jketema wants to merge 1 commit into
github:mainfrom
jketema:subst

Conversation

@jketema

@jketema jketema commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This shows that we do not consistently handle this across the CLI and the various extractors. All tests are: extract a file, check if the extracted file is relative to the source root, where the source root is a subst drive.

@github-actions github-actions Bot added C# JS Java Python Go Ruby Rust Pull requests that update Rust code labels Jun 29, 2026
@jketema jketema force-pushed the subst branch 2 times, most recently from 1c3f36d to 3c83d27 Compare June 29, 2026 15:20
@jketema jketema changed the title Add Windows integration tests showing that subst is handled inconsistently Add Windows integration tests showing that subst is handled inconsistently Jun 29, 2026
@jketema jketema marked this pull request as ready for review June 29, 2026 15:55
Copilot AI review requested due to automatic review settings June 29, 2026 15:55
@jketema jketema requested review from a team as code owners June 29, 2026 15:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Windows-only integration tests across multiple language packs to demonstrate inconsistent handling of subst-mapped source roots when extracting files and evaluating whether file paths are treated as relative to the source root.

Changes:

  • Introduce new subst integration-test directories for Rust, Ruby, Python, JavaScript, Go, Java/Kotlin, and C#.
  • For each test: create a database with source_root on a subst drive, then run a small query and compare .expected results to show (in)consistencies.
  • Add minimal source files per language to drive extraction on Windows.
Show a summary per file
File Description
rust/ql/integration-tests/subst/test.py Windows integration test that creates a Rust DB with a subst-drive source root.
rust/ql/integration-tests/subst/file.ql Query selecting files and whether a relative path exists (test oracle).
rust/ql/integration-tests/subst/file.expected Expected results for Rust extraction under subst.
rust/ql/integration-tests/subst/code/test.rs Minimal Rust source for extraction.
ruby/ql/integration-tests/subst/test.py Windows integration test that creates a Ruby DB with a subst-drive source root.
ruby/ql/integration-tests/subst/file.ql Query selecting files and whether a relative path exists (test oracle).
ruby/ql/integration-tests/subst/file.expected Expected results for Ruby extraction under subst.
ruby/ql/integration-tests/subst/code/test.rb Minimal Ruby source for extraction.
python/ql/integration-tests/subst/test.py Windows integration test that creates a Python DB with a subst-drive source root.
python/ql/integration-tests/subst/file.ql Query selecting files and whether a relative path exists (test oracle).
python/ql/integration-tests/subst/file.expected Expected results for Python extraction under subst.
python/ql/integration-tests/subst/code/main.py Minimal Python source for extraction.
javascript/ql/integration-tests/subst/test.py Windows integration test that creates a JavaScript DB with a subst-drive source root.
javascript/ql/integration-tests/subst/file.ql Query selecting files and whether a relative path exists (test oracle).
javascript/ql/integration-tests/subst/file.expected Expected results for JavaScript extraction under subst.
javascript/ql/integration-tests/subst/code/test.ts Minimal TypeScript source for extraction.
javascript/ql/integration-tests/subst/code/main.js Minimal JavaScript source for extraction.
java/ql/integration-tests/java/subst/test.py Windows integration test that creates a Java/Kotlin DB with a subst-drive source root.
java/ql/integration-tests/java/subst/file.ql Query selecting files and whether a relative path exists (test oracle).
java/ql/integration-tests/java/subst/file.expected Expected results for Java/Kotlin extraction under subst.
java/ql/integration-tests/java/subst/code/test2.kt Minimal Kotlin source for extraction.
java/ql/integration-tests/java/subst/code/test1.java Minimal Java source for extraction.
go/ql/integration-tests/subst/test.py Windows integration test that creates a Go DB with a subst-drive source root.
go/ql/integration-tests/subst/file.ql Query selecting files and whether a relative path exists (test oracle).
go/ql/integration-tests/subst/file.expected Expected results for Go extraction under subst.
go/ql/integration-tests/subst/code/main.go Minimal Go source for extraction.
csharp/ql/integration-tests/windows/subst/test.py Windows integration test that creates a C# DB with a subst-drive source root.
csharp/ql/integration-tests/windows/subst/file.ql Query selecting files and whether a relative path exists (test oracle).
csharp/ql/integration-tests/windows/subst/file.expected Expected results for C# extraction under subst.
csharp/ql/integration-tests/windows/subst/code/Program.cs Minimal C# program used for extraction/build.
csharp/ql/integration-tests/windows/subst/code/global.json .NET SDK pin for the test project.
csharp/ql/integration-tests/windows/subst/code/dotnet_build.csproj Minimal .NET project configuration for extraction/build.

Review details

  • Files reviewed: 32/32 changed files
  • Comments generated: 1
  • Review effort level: Low

@@ -0,0 +1,4 @@
class Program
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C# Go Java JS Python Ruby Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants