-
Notifications
You must be signed in to change notification settings - Fork 1k
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 script to compile, build, run, call API and test response [ci skip] #5737
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5737 +/- ##
==========================================
Coverage 67.77% 67.78%
- Complexity 16475 16479 +4
==========================================
Files 1901 1901
Lines 72121 72132 +11
Branches 7430 7430
==========================================
+ Hits 48882 48893 +11
+ Misses 20727 20726 -1
- Partials 2512 2513 +1 ☔ View full report in Codecov by Sentry. |
…I call and test result
|
||
echo "Start OTP, output: $OTP_LOG" | ||
mv target/otp-*-shaded.jar target/otp-shaded.jar | ||
java -Xmx16G -jar target/otp-shaded.jar ${DATA_DIR} --build --save --serve > ${OTP_LOG} & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be possible to use | tee "${OTP_LOG}"
instead of redirection to file, keep the console output and skip the tail
process below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it will work, I need the the java PID (see line 68) to terminate the java process later, so if we use tee
then I think we get the tee
PID instead. I tried something like it, but it did not work. Not sure if I did the exact same thing as you suggested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In practice it doesn't matter that much: even if it's the tee
pid that is killed, the whole pipe is still terminated.
while true ; do sleep 1 ; date ; done | tee /tmp/log.txt & ; PID=$! ; echo "PID: $PID\n" ; sleep 4 ; ps aux | grep $PID ; kill $PID
Nevermind, it doesn't matter. 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good tip, I didn't know that. I will leave it as is for now. Do not want to spend more time on it.
Co-authored-by: Johan Torin <[email protected]>
Co-authored-by: Leonard Ehrenfried <[email protected]>
Summary
When searching for bugs it is sometimes useful to eliminate commits, and or comment out code and perform a test to verify if the bug is precent or not. Git provide a handy tool for doing a binary search in commits, the
git bisect
command. This PR add a script which automate the pocess of verifying if a bug is present or not.For more information look at the
--help
section in the script.This PR also add a README file and some guidelines for scripts.
Issue
🟥 No issue. This is just tooling for developers.
Unit tests
🟥 The script have no tests.
Documentation
✅ Script Readme.md and Script usage.
Changelog
🟥 This is not relevant for product owners
Bumping the serialization version id
🟥 OTP Source code not changed