-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [`tail(id,file)`]: simulate the *NIX tail command. Signed-off-by: automike <mikeliucc@users.noreply.github.com>
- Loading branch information
Showing
49 changed files
with
128 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/kotlin/org/nexial/commons/proc/ExternalProcessTerminator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2012-2018 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.nexial.commons.proc | ||
|
||
import org.nexial.core.plugins.ForcefulTerminate | ||
|
||
class ExternalProcessTerminator(var externalProc: Process?) : ForcefulTerminate { | ||
override fun mustForcefullyTerminate() = externalProc != null && externalProc!!.isAlive | ||
|
||
override fun forcefulTerminate() { | ||
if (mustForcefullyTerminate()) { | ||
println("forcefully destroying process $externalProc...") | ||
externalProc!!.destroyForcibly() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+10 Bytes
(100%)
src/test/resources/showcase/artifact/data/external-showcase.data.xlsx
Binary file not shown.
Binary file modified
BIN
+232 Bytes
(100%)
src/test/resources/showcase/artifact/script/base-showcase-macro.xlsx
Binary file not shown.
Binary file modified
BIN
+239 Bytes
(100%)
src/test/resources/showcase/artifact/script/base-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+251 Bytes
(100%)
src/test/resources/showcase/artifact/script/disable-showcase-macro.xlsx
Binary file not shown.
Binary file modified
BIN
+224 Bytes
(100%)
src/test/resources/showcase/artifact/script/disable-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+244 Bytes
(100%)
src/test/resources/showcase/artifact/script/electron-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+259 Bytes
(100%)
src/test/resources/showcase/artifact/script/excel-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+225 Bytes
(100%)
src/test/resources/showcase/artifact/script/expression-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
-11 Bytes
(100%)
src/test/resources/showcase/artifact/script/external-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+229 Bytes
(100%)
src/test/resources/showcase/artifact/script/failafter-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+243 Bytes
(100%)
src/test/resources/showcase/artifact/script/image-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+238 Bytes
(100%)
src/test/resources/showcase/artifact/script/io-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+250 Bytes
(100%)
src/test/resources/showcase/artifact/script/jmeter-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+243 Bytes
(100%)
src/test/resources/showcase/artifact/script/json-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+228 Bytes
(100%)
src/test/resources/showcase/artifact/script/mail-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+239 Bytes
(100%)
src/test/resources/showcase/artifact/script/number-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+231 Bytes
(100%)
src/test/resources/showcase/artifact/script/redis-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+249 Bytes
(100%)
src/test/resources/showcase/artifact/script/sqs-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+249 Bytes
(100%)
src/test/resources/showcase/artifact/script/step-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+238 Bytes
(100%)
src/test/resources/showcase/artifact/script/testplan-report-test-harness.xlsx
Binary file not shown.
Binary file modified
BIN
-70.2 KB
(83%)
src/test/resources/showcase/artifact/script/web-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+236 Bytes
(100%)
src/test/resources/showcase/artifact/script/ws.async-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+234 Bytes
(100%)
src/test/resources/showcase/artifact/script/xml-showcase.xlsx
Binary file not shown.
Binary file modified
BIN
+247 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_ExecInterrupt.xlsx
Binary file not shown.
Binary file modified
BIN
+232 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_ExecInterrupt_iter.xlsx
Binary file not shown.
Binary file modified
BIN
+250 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_IterationDataTests.xlsx
Binary file not shown.
Binary file modified
BIN
+237 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_base_macro.xlsx
Binary file not shown.
Binary file modified
BIN
+238 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_base_macro2-macro.xlsx
Binary file not shown.
Binary file modified
BIN
+250 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_base_macro2.xlsx
Binary file not shown.
Binary file modified
BIN
+250 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_base_macro3-macro.xlsx
Binary file not shown.
Binary file modified
BIN
+247 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_base_macro3.xlsx
Binary file not shown.
Binary file modified
BIN
-46.9 KB
(82%)
src/test/resources/unittesting/artifact/script/unitTest_base_part1.xlsx
Binary file not shown.
Binary file modified
BIN
+248 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_base_part2.xlsx
Binary file not shown.
Binary file modified
BIN
+259 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_base_part3.xlsx
Binary file not shown.
Binary file modified
BIN
+230 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_excel.xlsx
Binary file not shown.
Binary file modified
BIN
+232 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_expressions.xlsx
Binary file not shown.
Binary file modified
BIN
+283 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_io.xlsx
Binary file not shown.
Binary file modified
BIN
+240 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_json.xlsx
Binary file not shown.
Binary file modified
BIN
+250 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_numberCommand.xlsx
Binary file not shown.
Binary file modified
BIN
+236 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_rdbms.xlsx
Binary file not shown.
Binary file modified
BIN
+239 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_repeatUntil.xlsx
Binary file not shown.
Binary file modified
BIN
+252 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_web.xlsx
Binary file not shown.
Binary file modified
BIN
+248 Bytes
(100%)
src/test/resources/unittesting/artifact/script/unitTest_xml.xlsx
Binary file not shown.