-
Notifications
You must be signed in to change notification settings - Fork 218
Run unit tests w/ drogon in separate processes #3237
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
Closed
+71
−23
Closed
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a8d65da
save
dkalinowski c1875ab
run drogon tests in separate proc
dkalinowski 9bc11ae
Merge remote-tracking branch 'origin/main' into drogon-proc
dkalinowski 563f23c
Merge remote-tracking branch 'origin/main' into drogon-proc
dkalinowski 18b3ab5
style
dkalinowski c33427d
Merge remote-tracking branch 'origin/main' into drogon-proc
dkalinowski 125cd0c
name
dkalinowski ccf5b5b
sequential test
dkalinowski 82fdeac
gitignore
dkalinowski db34d20
includes
dkalinowski a210cd3
maned
dkalinowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
|
@@ -44,9 +44,10 @@ if [ "$RUN_GPU_TESTS" == "1" ]; then | |
fi | ||
|
||
compress_logs() { | ||
tar -czf test_logs.tar.gz ${TEST_LOG} | ||
tar -czf test_logs.tar.gz ${TEST_LOG} drogon_singleton_test_log_*.log | ||
rm -rf ${TEST_LOG} | ||
rm -rf tmp.log | ||
#rm -rf drogon_singleton_test_log_*.log | ||
} | ||
|
||
generate_coverage_report() { | ||
|
@@ -108,6 +109,41 @@ if [ "$RUN_TESTS" == "1" ] ; then | |
fi | ||
grep -a " ms \| ms)" ${TEST_LOG} > linux_tests_summary.log | ||
echo "Tests completed:" `grep -a " ms \| ms)" ${TEST_LOG} | grep " OK " | wc -l` | ||
|
||
if [ $failed -eq 0 ]; then | ||
echo "All main tests passed. Running drogon singleton tests..." | ||
|
||
run_additional_drogon_singleton_tests() { | ||
failed_drogon_singleton=0 | ||
echo "Running ConfigChangeStressTest suite..." | ||
bazel test --jobs=$JOBS ${debug_bazel_flags} ${SHARED_OPTIONS} --test_summary=detailed --test_output=streamed --test_filter="ConfigChangeStressTest.GetMetricsDuringLoad_DROGON" --test_env=DROGON_RESTART=1 //src:ovms_test > drogon_singleton_test_log_1.log 2>&1 || failed_drogon_singleton=1 & | ||
pid1=$! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make tests launched in sequence -they are not concurrent proof |
||
|
||
echo "Running StressCapiConfigChanges suite..." | ||
bazel test --jobs=$JOBS ${debug_bazel_flags} ${SHARED_OPTIONS} --test_summary=detailed --test_output=streamed --test_filter="StressCapiConfigChanges.GetMetricsDuringLoad_DROGON" --test_env=DROGON_RESTART=1 //src:ovms_test > drogon_singleton_test_log_2.log 2>&1 || failed_drogon_singleton=1 & | ||
pid2=$! | ||
|
||
echo "Running Server suite..." | ||
bazel test --jobs=$JOBS ${debug_bazel_flags} ${SHARED_OPTIONS} --test_summary=detailed --test_output=streamed --test_filter="Server.CAPIAliveGrpcNotHttpYes_DROGON" --test_env=DROGON_RESTART=1 //src:ovms_test > drogon_singleton_test_log_3.log 2>&1 || failed_drogon_singleton=1 & | ||
pid3=$! | ||
|
||
wait $pid1 | ||
wait $pid2 | ||
wait $pid3 | ||
|
||
if [ $failed_drogon_singleton -ne 0 ]; then | ||
echo "Some drogon singleton tests failed:" | ||
cat drogon_singleton_test_log_*.txt | ||
return 1 | ||
else | ||
echo "All drogon singleton tests passed successfully." | ||
return 0 | ||
fi | ||
} | ||
|
||
run_additional_drogon_singleton_tests || exit 1 | ||
fi | ||
|
||
compress_logs | ||
exit $failed | ||
fi |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
?