forked from projectkudu/KuduScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cmd
46 lines (31 loc) · 752 Bytes
/
test.cmd
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
@echo off
setlocal enabledelayedexpansion
set kuduscript_dir=%~dp0
pushd %temp%
rd /s /q kuduscript_test 2>nul
mkdir kuduscript_test
cd kuduscript_test
git clone https://github.com/amitapl/azure-sdk-tools-xplat.git
IF !ERRORLEVEL! NEQ 0 goto error
cd azure-sdk-tools-xplat
git checkout dev
IF !ERRORLEVEL! NEQ 0 goto error
call npm install
IF !ERRORLEVEL! NEQ 0 goto error
call npm install %kuduscript_dir%
IF !ERRORLEVEL! NEQ 0 goto error
call node_modules\.bin\mocha.cmd -u tdd -R spec test\commands\cli.site-deploymentscript-tests.js
IF !ERRORLEVEL! NEQ 0 goto error
goto success
:error
popd
echo Failed
call :exitSetErrorLevel
call :exitFromFunction 2>nul
:exitSetErrorLevel
exit /b 1
:exitFromFunction
()
:success
popd
echo Success