Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProcessUtil #293

Merged
merged 7 commits into from
Jan 30, 2025
Merged

Add ProcessUtil #293

merged 7 commits into from
Jan 30, 2025

Conversation

Lipen
Copy link
Member

@Lipen Lipen commented Jan 29, 2025

This PR adds the utility function ProcessUtil.run similar to Util.sh from jdot, but better (written in Kotlin and using coroutines).

  • Add timeout support.
  • Show the captured output (stdout/stderr) in case of execution failure (exitCode != 0).
  • Store captured output (stdout/stderr).
  • Use ProcessUtil.run instead of ad-hoc runProcess.
  • Add unit tests.

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
Lipen Konstantin Chukharev
Similar to `Util.sh`, but with Kotlin and coroutines
@Lipen Lipen requested a review from CaelmBleidd January 29, 2025 15:14
Copy link
Contributor

github-actions bot commented Jan 29, 2025

Lifecycle test results

78 tests  ±0   78 ✅ ±0   1m 26s ⏱️ -2s
 7 suites ±0    0 💤 ±0 
 7 files   ±0    0 ❌ ±0 

Results for commit 126aa33. ± Comparison against base commit ddbea5d.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

Test results on JDK 8

 70 files  +1   70 suites  +1   4m 55s ⏱️ +15s
624 tests +1  611 ✅ +1  13 💤 ±0  0 ❌ ±0 
694 runs  +1  681 ✅ +1  13 💤 ±0  0 ❌ ±0 

Results for commit 126aa33. ± Comparison against base commit ddbea5d.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

Test results on JDK 11

 70 files  +1   70 suites  +1   5m 10s ⏱️ -4s
624 tests +1  616 ✅ +1  8 💤 ±0  0 ❌ ±0 
694 runs  +1  686 ✅ +1  8 💤 ±0  0 ❌ ±0 

Results for commit 126aa33. ± Comparison against base commit ddbea5d.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

Test results on JDK 19

 70 files  +1   70 suites  +1   4m 39s ⏱️ -3s
624 tests +1  614 ✅ +1  10 💤 ±0  0 ❌ ±0 
694 runs  +1  684 ✅ +1  10 💤 ±0  0 ❌ ±0 

Results for commit 126aa33. ± Comparison against base commit ddbea5d.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 54.16667% with 33 lines in your changes missing coverage. Please review.

Project coverage is 71.64%. Comparing base (ddbea5d) to head (126aa33).
Report is 2 commits behind head on neo.

Files with missing lines Patch % Lines
...rc/main/kotlin/org/jacodb/ets/utils/ProcessUtil.kt 62.96% 11 Missing and 9 partials ⚠️
...rc/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt 35.71% 7 Missing and 2 partials ⚠️
...db-ets/src/main/kotlin/org/jacodb/ets/utils/Dot.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                neo     #293      +/-   ##
============================================
+ Coverage     71.31%   71.64%   +0.33%     
- Complexity     2430     2448      +18     
============================================
  Files           254      255       +1     
  Lines         14385    14505     +120     
  Branches       2106     2126      +20     
============================================
+ Hits          10258    10392     +134     
+ Misses         3257     3224      -33     
- Partials        870      889      +19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Lipen added 6 commits January 29, 2025 19:05

Verified

This commit was signed with the committer’s verified signature.
Lipen Konstantin Chukharev
`inputReader`, `errorReader`, `outputWriter` are only available since Java 17

Verified

This commit was signed with the committer’s verified signature.
Lipen Konstantin Chukharev

Verified

This commit was signed with the committer’s verified signature.
Lipen Konstantin Chukharev

Verified

This commit was signed with the committer’s verified signature.
Lipen Konstantin Chukharev

Verified

This commit was signed with the committer’s verified signature.
Lipen Konstantin Chukharev

Verified

This commit was signed with the committer’s verified signature.
Lipen Konstantin Chukharev
@Lipen Lipen merged commit 60c28d3 into neo Jan 30, 2025
9 of 10 checks passed
@Lipen Lipen deleted the lipen/process branch January 30, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants