-
-
Notifications
You must be signed in to change notification settings - Fork 0
Enhance database handling, GUI stability, and testing support #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fd6bbba
ab980ed
72745ff
2682bbd
115ae8f
a60e9d7
1486af1
540c40e
49e8142
0510189
1adeb29
ecc7232
97ef5e4
cdd9fd7
6c2e88e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -83,16 +83,19 @@ if ($IsWindows) { | |
| if (Test-Path $testExe) { | ||
| $env:PATH = "$QtPath\bin;$QtPath\lib;$env:PATH" | ||
| Write-Host "Executing: $testExe" | ||
| & $testExe | ||
| $env:PATH = $env:PATH -replace [regex]::Escape("$QtPath\bin;$QtPath\lib;"), "" | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Error "Tests failed (exit code: $LASTEXITCODE)" | ||
| Push-Location build | ||
| & .\SQLiteQueryTests.exe | ||
| $testExitCode = $LASTEXITCODE | ||
| Pop-Location | ||
| if ($testExitCode -ne 0) { | ||
| Write-Error "Tests failed (exit code: $testExitCode)" | ||
| exit 1 | ||
| } | ||
| Write-Host "`n=== All tests passed ===" -ForegroundColor Green | ||
| } | ||
| else { | ||
| Write-Warning "Test executable not found at: $testExe" | ||
| Write-Error "Test executable not found at: $testExe" | ||
| exit 1 | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -106,6 +109,30 @@ if ($IsLinux) { | |
| cmake --build build --config Release --parallel $(nproc) | ||
| cmake --install build | ||
|
|
||
| Write-Host "`nRunning tests..." | ||
| $testExe = "./build/SQLiteQueryTests" | ||
| if (Test-Path $testExe) { | ||
| $originalPath = $env:PATH | ||
| if ($QtPath) { | ||
| $pathArray = ($env:PATH -split ':') | Where-Object { $_ -ne "$QtPath/bin" -and $_ -ne "$QtPath/lib" } | ||
| $pathArray = @("$QtPath/bin", "$QtPath/lib") + $pathArray | ||
| $env:PATH = $pathArray -join ':' | ||
| } | ||
| Write-Host "Executing: $testExe" | ||
| & $testExe | ||
| if ($QtPath) { | ||
| $env:PATH = $originalPath | ||
| } | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Error "Tests failed (exit code: $LASTEXITCODE)" | ||
| exit 1 | ||
| } | ||
| Write-Host "`n=== All tests passed ===" -ForegroundColor Green | ||
| } | ||
| else { | ||
| Write-Warning "Test executable not found at: $testExe" | ||
| } | ||
|
Comment on lines
+112
to
+134
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent handling of missing test executables across platforms. On Windows (lines 97-98), a missing test executable triggers 🔧 Proposed fix to make Linux consistent with Windows else {
- Write-Warning "Test executable not found at: $testExe"
+ Write-Error "Test executable not found at: $testExe"
+ exit 1
}🤖 Prompt for AI Agents |
||
|
|
||
| if ($Package) { | ||
| cpack -G 7Z --config ./build/CPackConfig.cmake | ||
| cpack -G ZIP --config ./build/CPackConfig.cmake | ||
|
|
@@ -125,10 +152,35 @@ if ($IsLinux) { | |
| } | ||
| } | ||
|
|
||
| if ($IsMacOS -And $Package) { | ||
| if ($IsMacOS) { | ||
|
|
||
| cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/sqlitequery | ||
| cmake --build build --config Release --parallel 32 | ||
|
|
||
| Write-Host "`nRunning tests..." | ||
| $testExe = "./build/SQLiteQueryTests" | ||
| if (Test-Path $testExe) { | ||
| $originalPath = $env:PATH | ||
| if ($QtPath) { | ||
| $pathArray = ($env:PATH -split ':') | Where-Object { $_ -ne "$QtPath/bin" -and $_ -ne "$QtPath/lib" } | ||
| $pathArray = @("$QtPath/bin", "$QtPath/lib") + $pathArray | ||
| $env:PATH = $pathArray -join ':' | ||
| } | ||
| Write-Host "Executing: $testExe" | ||
| & $testExe | ||
| if ($QtPath) { | ||
| $env:PATH = $originalPath | ||
| } | ||
| if ($LASTEXITCODE -ne 0) { | ||
| Write-Error "Tests failed (exit code: $LASTEXITCODE)" | ||
| exit 1 | ||
| } | ||
| Write-Host "`n=== All tests passed ===" -ForegroundColor Green | ||
| } | ||
| else { | ||
| Write-Warning "Test executable not found at: $testExe" | ||
| } | ||
|
Comment on lines
+155
to
+182
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent handling of missing test executables across platforms. On Windows (lines 97-98), a missing test executable triggers 🔧 Proposed fix to make macOS consistent with Windows else {
- Write-Warning "Test executable not found at: $testExe"
+ Write-Error "Test executable not found at: $testExe"
+ exit 1
}🤖 Prompt for AI Agents |
||
|
|
||
| if ($Package) { | ||
| macdeployqt build/SQLiteQueryAnalyzer.app -dmg -appstore-compliant | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,7 +12,7 @@ QList<QueryResult> QueryExecutor::runScript(const QString &script, QStringList * | |||||||||
| QList<QueryResult> QueryExecutor::runStatements(const QStringList &statements, QStringList *errors) { | ||||||||||
| QList<QueryResult> results; | ||||||||||
| for (const auto &raw: statements) { | ||||||||||
| const QString sql = raw.trimmed().replace('\n', "", Qt::CaseInsensitive); | ||||||||||
| const QString sql = raw.trimmed().replace('\n', ""); | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace newline stripping with whitespace normalization. At Line 15, replacing Suggested fix- const QString sql = raw.trimmed().replace('\n', "");
+ QString sql = raw.trimmed();
+ sql.replace('\r', ' ');
+ sql.replace('\n', ' ');📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| if (sql.isEmpty()) | ||||||||||
| continue; | ||||||||||
|
|
||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExportOrchestrator is not a seam and should not be listed in the Seams section.
Per the coding guidelines, seams must be abstract interfaces with at least two adapters. ExportOrchestrator is a concrete orchestrator class, not an abstraction. This description already exists correctly in the Modules section (lines 44-45).
The Seams section should only list abstract interfaces like IDatabase. Remove ExportOrchestrator from here to avoid confusion about the architecture.
📐 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents
Source: Coding guidelines