jfclere commented on code in PR #260:
URL: https://github.com/apache/commons-daemon/pull/260#discussion_r2081748455


##########
src/native/windows/apps/prunsrv/test/scripts/test.bat:
##########
@@ -0,0 +1,218 @@
+@ECHO OFF
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem ---------------------------------------------------------------------------
+rem Test script for procrun
+rem to run it you need:
+rem 1 - the commons-daemon-*-tests.jar
+rem 2 - procrun.exe in a subdirectory (usually something like 
WIN10_X64_EXE_RELEASE\prunsrv.exe)
+rem 3 - use cmd/c test.bat in the command Prompt (cmd)
+rem the test are OK once test.bat Done!!! is displayed at the test of the bat 
script.
+
+SETLOCAL ENABLEEXTENSIONS
+SETLOCAL EnableDelayedExpansion
+SET mypath=%cd%
+WHERE /r ..\..\ prunsrv.exe 1>in.txt
+SET /p myserv=<in.txt
+WHERE /r ..\..\..\..\..\..\..\target *-tests.jar  1>in.txt
+SET /p myjar=<in.txt
+ECHO "myserv: %myserv%"
+ECHO "myjar: %myjar%"
+ECHO "%mypath: %mypath%"
+
+echo "cleaning..."
+call mybanner stopping
+%myserv% //SS//TestService
+if %errorlevel% neq 0 (
+  echo "Stop service failed"
+)
+call mybanner deleting
+%myserv% //DS//TestService
+if %errorlevel% equ 9 (
+  echo "delete failed, not installed"
+) else (
+  if %errorlevel% neq 0 (
+    echo "delete failed"
+    exit 1
+  )
+)
+echo "cleaned"
+
+rem install service with notimeout and no wait

Review Comment:
   I added some comments.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to