-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathGet-CompilerSpecificFiles.ps1
More file actions
39 lines (36 loc) · 1.05 KB
/
Get-CompilerSpecificFiles.ps1
File metadata and controls
39 lines (36 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
. "$PSScriptRoot/Config.ps1"
function Get-CompilerSpecificFiles {
param([Parameter(Mandatory)]
[string]
$Configuration,
[Parameter(Mandatory)]
[ValidateSet('c', 'cpp')]
[string]
$Language,
[Parameter(Mandatory)]
[string]
$TestDirectory,
[Parameter(Mandatory)]
[string]
$Query
)
#
# Convention is as follows:
#
# For test files:
#
# file.c/cpp is used for ALL compilers
# file.c.<configuration>/file.cpp.<configuration> is used for <configuration>
#
# file.expected is used for all compilers
# file.expected.<configuration> is used for <configuration>
Write-Host "Scanning for compiler specific files in $TestDirectory"
foreach($f in (Get-ChildItem -Filter "*.$Language.$Configuration" $TestDirectory)){
Write-Host "Found file $f..."
$f
}
foreach($f in (Get-ChildItem -Filter "$Query.expected.$Configuration" $TestDirectory)){
Write-Host "Found file $f..."
$f
}
}