-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCompile_testsuite.bat
62 lines (50 loc) · 1.96 KB
/
Compile_testsuite.bat
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
rem Get Current Path
set defaultPath=%CD%
set defaultPath=%defaultPath: =%
set /p version=<Version.txt
set ReleasePath=%defaultPath%\Release_%version%
set runPath=%ReleasePath%\run
set workloadsPath=%ReleasePath%\workloads
set commonPath=%workloadsPath%\common
set resultsPath=%ReleasePath%\results
echo %runPath%
echo %defaultPath%
if not exist %ReleasePath% mkdir %ReleasePath%
if not exist %runPath% mkdir %runPath%
if not exist %workloadsPath% mkdir %workloadsPath%
if not exist %resultsPath% mkdir %resultsPath%
if not exist %commonPath% mkdir %commonPath%
set Identifier=false
rem Iterate over directory
for /D %%w in (*) do (
SETLOCAL ENABLEDELAYEDEXPANSION
set workloadPath=%defaultPath%\%%~nxw
for /f "tokens=1 delims=_" %%a in ("%%~nxw") DO (
set var=%%a
if "!var!" == "Excel" ( set "Identifier=true")
if "!var!" == "Word" ( set "Identifier=true")
if "!var!" == "Outlook" ( set "Identifier=true")
if "!var!" == "Powerpoint" ( set "Identifier=true")
)
if "!Identifier!" == "true" (
REM Print Workload path
echo !workloadPath!
cd !workloadPath!
nuget install !workloadPath!\%%~nxw\packages.config -o !workloadPath!\packages\
echo !workloadPath!\%%~nxw.sln
msbuild !workloadPath!\%%~nxw.sln /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU"
if not !errorlevel! == 0 (exit /b !errorlevel!)
set exePath=!workloadPath!\%%~nxw\bin\Release\Executable
if not exist !workloadsPath!\%%~nxw\bin mkdir !workloadsPath!\%%~nxw\bin
if not exist !workloadsPath!\%%~nxw\input mkdir !workloadsPath!\%%~nxw\input
copy !exePath! !workloadsPath!\%%~nxw\bin
copy !workloadPath!\%%~nxw\bin\Release\input !workloadsPath!\%%~nxw\input
cd %defaultPath%
)
copy %defaultPath%\MSOffice_Test_Automation*.bat* %runPath%
copy %defaultPath%\common\*.wprp* %commonPath%
if exist %defaultPath%\common\HelpText.txt copy %defaultPath%\common\HelpText.txt %commonPath%
if exist %defaultPath%\common\manifest.xml copy %defaultPath%\common\manifest.xml %ReleasePath%
ENDLOCAL
)