-
Notifications
You must be signed in to change notification settings - Fork 79
Tests failures should fail pipeline stage #517
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
Open
jasonmreding
wants to merge
5
commits into
master
Choose a base branch
from
users/jreding/ReentrancyFixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
16bfa8f
Tests failures should fail pipeline stage.
jasonmreding 8ed6bde
Fix examples:
jasonmreding cb1dd58
Update other test projects reentrancy and source only changes as well…
jasonmreding a70b98f
Update test runner script to include the test log from the LV CLI int…
jasonmreding 018923e
Update test runner script to not log failed test results twice.
jasonmreding 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 19.0 |
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
Binary file modified
BIN
+96 Bytes
(100%)
examples/helloworld/helloworld_client/RPC Messages/helloworld_HelloReply.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
examples/helloworld/helloworld_client/RPC Messages/helloworld_HelloRequest.ctl
Binary file not shown.
Binary file modified
BIN
-768 Bytes
(84%)
examples/helloworld/helloworld_server/RPC Messages/helloworld_HelloReply.ctl
Binary file not shown.
Binary file modified
BIN
-768 Bytes
(84%)
examples/helloworld/helloworld_server/RPC Messages/helloworld_HelloRequest.ctl
Binary file not shown.
Binary file modified
BIN
+928 Bytes
(110%)
examples/helloworld/helloworld_server/RPC Service/Greeter/Server API/Destroy.vi
Binary file not shown.
Binary file modified
BIN
+872 Bytes
(100%)
...ples/helloworld/helloworld_server/RPC Service/Greeter/Server API/Register gRPC Methods.vi
Binary file not shown.
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
Binary file modified
BIN
-1.01 KB
(80%)
examples/query_server/Query_server/RPC Messages/queryserver_InvokeRequest.ctl
Binary file not shown.
Binary file modified
BIN
-564 Bytes
(88%)
examples/query_server/Query_server/RPC Messages/queryserver_InvokeResponse.ctl
Binary file not shown.
Binary file modified
BIN
-720 Bytes
(85%)
examples/query_server/Query_server/RPC Messages/queryserver_QueryRequest.ctl
Binary file not shown.
Binary file modified
BIN
-1008 Bytes
(81%)
examples/query_server/Query_server/RPC Messages/queryserver_QueryResponse.ctl
Binary file not shown.
Binary file modified
BIN
-716 Bytes
(85%)
examples/query_server/Query_server/RPC Messages/queryserver_RegistrationRequest.ctl
Binary file not shown.
Binary file modified
BIN
-1.05 KB
(80%)
examples/query_server/Query_server/RPC Messages/queryserver_ServerEvent.ctl
Binary file not shown.
Binary file modified
BIN
-684 Bytes
(96%)
examples/query_server/Query_server/RPC Service/QueryServer/Server API/Destroy.vi
Binary file not shown.
Binary file modified
BIN
-1.19 KB
(95%)
...les/query_server/Query_server/RPC Service/QueryServer/Server API/Register gRPC Methods.vi
Binary file not shown.
Binary file modified
BIN
-11 KB
(77%)
examples/query_server/Query_server/RPC Service/QueryServer/Server API/Start Sync.vi
Binary file not shown.
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
Binary file modified
BIN
+96 Bytes
(100%)
examples/route_guide/route_guide_client/RPC Messages/routeguide_Feature.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
examples/route_guide/route_guide_client/RPC Messages/routeguide_Point.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
examples/route_guide/route_guide_client/RPC Messages/routeguide_Rectangle.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
examples/route_guide/route_guide_client/RPC Messages/routeguide_RouteNote.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
examples/route_guide/route_guide_client/RPC Messages/routeguide_RouteSummary.ctl
Binary file not shown.
Binary file modified
BIN
-1.18 KB
(79%)
examples/route_guide/route_guide_server/RPC Messages/routeguide_Feature.ctl
Binary file not shown.
Binary file modified
BIN
-624 Bytes
(87%)
examples/route_guide/route_guide_server/RPC Messages/routeguide_Point.ctl
Binary file not shown.
Binary file modified
BIN
-812 Bytes
(85%)
examples/route_guide/route_guide_server/RPC Messages/routeguide_Rectangle.ctl
Binary file not shown.
Binary file modified
BIN
-1.16 KB
(80%)
examples/route_guide/route_guide_server/RPC Messages/routeguide_RouteNote.ctl
Binary file not shown.
Binary file modified
BIN
-684 Bytes
(86%)
examples/route_guide/route_guide_server/RPC Messages/routeguide_RouteSummary.ctl
Binary file not shown.
Binary file modified
BIN
-2.6 KB
(88%)
...oute_guide/route_guide_server/RPC Service/RouteGuide/Feature API/Find Feature by Point.vi
Binary file not shown.
Binary file modified
BIN
-3.66 KB
(84%)
...les/route_guide/route_guide_server/RPC Service/RouteGuide/Feature API/Get Feature List.vi
Binary file not shown.
Binary file modified
BIN
-680 Bytes
(96%)
examples/route_guide/route_guide_server/RPC Service/RouteGuide/Server API/Destroy.vi
Binary file not shown.
Binary file modified
BIN
-1.37 KB
(94%)
...route_guide/route_guide_server/RPC Service/RouteGuide/Server API/Register gRPC Methods.vi
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
tests/AutoTests/ClientCallAbortTests/Generated_client/RPC Messages/helloworld_ByeReply.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
tests/AutoTests/ClientCallAbortTests/Generated_client/RPC Messages/helloworld_ByeRequest.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
tests/AutoTests/ClientCallAbortTests/Generated_client/RPC Messages/helloworld_HelloReply.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
.../AutoTests/ClientCallAbortTests/Generated_client/RPC Messages/helloworld_HelloRequest.ctl
Binary file not shown.
Binary file modified
BIN
-780 Bytes
(83%)
tests/AutoTests/ClientCallAbortTests/Generated_server/RPC Messages/helloworld_ByeReply.ctl
Binary file not shown.
Binary file modified
BIN
-776 Bytes
(84%)
tests/AutoTests/ClientCallAbortTests/Generated_server/RPC Messages/helloworld_ByeRequest.ctl
Binary file not shown.
Binary file modified
BIN
-776 Bytes
(84%)
tests/AutoTests/ClientCallAbortTests/Generated_server/RPC Messages/helloworld_HelloReply.ctl
Binary file not shown.
Binary file modified
BIN
-776 Bytes
(84%)
.../AutoTests/ClientCallAbortTests/Generated_server/RPC Messages/helloworld_HelloRequest.ctl
Binary file not shown.
Binary file modified
BIN
+120 Bytes
(100%)
...AutoTests/ClientCallAbortTests/Generated_server/RPC Service/Greeter/Server API/Destroy.vi
Binary file not shown.
Binary file modified
BIN
+108 Bytes
(100%)
...ntCallAbortTests/Generated_server/RPC Service/Greeter/Server API/Register gRPC Methods.vi
Binary file not shown.
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
Binary file modified
BIN
+56 Bytes
(100%)
tests/AutoTests/ClientCancellationTests/BiDiStreamingCancellationTest.vi
Binary file not shown.
Binary file modified
BIN
+56 Bytes
(100%)
tests/AutoTests/ClientCancellationTests/ClientStreamingCancellationTest.vi
Binary file not shown.
Binary file modified
BIN
+56 Bytes
(100%)
tests/AutoTests/ClientCancellationTests/ServerStreamingCancellationTest.vi
Binary file not shown.
Binary file modified
BIN
+56 Bytes
(100%)
tests/AutoTests/ClientCancellationTests/UnaryClientCancellationTest.vi
Binary file not shown.
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
Binary file modified
BIN
+96 Bytes
(100%)
.../AutoTests/ClientCancellationTests/route_guide_client/RPC Messages/routeguide_Feature.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
tests/AutoTests/ClientCancellationTests/route_guide_client/RPC Messages/routeguide_Point.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
...utoTests/ClientCancellationTests/route_guide_client/RPC Messages/routeguide_Rectangle.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
...utoTests/ClientCancellationTests/route_guide_client/RPC Messages/routeguide_RouteNote.ctl
Binary file not shown.
Binary file modified
BIN
+96 Bytes
(100%)
...Tests/ClientCancellationTests/route_guide_client/RPC Messages/routeguide_RouteSummary.ctl
Binary file not shown.
Binary file modified
BIN
-5.96 KB
(88%)
...nTests/route_guide_client/RPC Service/RouteGuide/End routeguide_RouteGuide_RecordRoute.vi
Binary file not shown.
Binary file modified
BIN
-5.53 KB
(87%)
...oute_guide_client/RPC Service/RouteGuide/ReadStream routeguide_RouteGuide_ListFeatures.vi
Binary file not shown.
Binary file modified
BIN
-5.5 KB
(87%)
...s/route_guide_client/RPC Service/RouteGuide/ReadStream routeguide_RouteGuide_RouteChat.vi
Binary file not shown.
Binary file modified
BIN
-17 KB
(71%)
...Tests/route_guide_client/RPC Service/RouteGuide/Unary routeguide_RouteGuide_GetFeature.vi
Binary file not shown.
Binary file modified
BIN
-592 Bytes
(86%)
tests/AutoTests/ClientCancellationTests/route_guide_server/Is Call Cancelled Global.vi
Binary file not shown.
Binary file modified
BIN
-1.2 KB
(79%)
.../AutoTests/ClientCancellationTests/route_guide_server/RPC Messages/routeguide_Feature.ctl
Binary file not shown.
Binary file modified
BIN
-656 Bytes
(86%)
tests/AutoTests/ClientCancellationTests/route_guide_server/RPC Messages/routeguide_Point.ctl
Binary file not shown.
Binary file modified
BIN
-840 Bytes
(85%)
...utoTests/ClientCancellationTests/route_guide_server/RPC Messages/routeguide_Rectangle.ctl
Binary file not shown.
Binary file modified
BIN
-1.18 KB
(79%)
...utoTests/ClientCancellationTests/route_guide_server/RPC Messages/routeguide_RouteNote.ctl
Binary file not shown.
Binary file modified
BIN
-708 Bytes
(86%)
...Tests/ClientCancellationTests/route_guide_server/RPC Messages/routeguide_RouteSummary.ctl
Binary file not shown.
Binary file modified
BIN
-2.6 KB
(88%)
...ationTests/route_guide_server/RPC Service/RouteGuide/Feature API/Find Feature by Point.vi
Binary file not shown.
Binary file modified
BIN
-3.66 KB
(84%)
...ncellationTests/route_guide_server/RPC Service/RouteGuide/Feature API/Get Feature List.vi
Binary file not shown.
Binary file modified
BIN
-680 Bytes
(96%)
...s/ClientCancellationTests/route_guide_server/RPC Service/RouteGuide/Server API/Destroy.vi
Binary file not shown.
Binary file modified
BIN
-1.37 KB
(94%)
...lationTests/route_guide_server/RPC Service/RouteGuide/Server API/Register gRPC Methods.vi
Binary file not shown.
Binary file modified
BIN
-596 Bytes
(88%)
tests/AutoTests/ClientCancellationTests/route_guide_server/Server Error Global.vi
Binary file not shown.
Binary file modified
BIN
+148 Bytes
(100%)
...ver/gRPC - Example_1/Example_1_server/RPC Service/NodeCustomService/Server API/Destroy.vi
Binary file not shown.
Binary file modified
BIN
+124 Bytes
(100%)
...mple_1/Example_1_server/RPC Service/NodeCustomService/Server API/Register gRPC Methods.vi
Binary file not shown.
Binary file modified
BIN
+2.22 KB
(110%)
...ample_2_client/RPC Service/NodeCustomService/Unary adas_NodeCustomService_GetExample_2.vi
Binary file not shown.
Binary file modified
BIN
+2.56 KB
(110%)
...ample_2_client/RPC Service/NodeCustomService/Unary adas_NodeCustomService_SetExample_2.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
|---|---|---|
|
|
@@ -20,16 +20,17 @@ def run_all_tests(): | |
| _logger.debug(f"Running tests in {test_directory}...") | ||
| test_runner_vi = os.path.join(test_directory, "gRPC_ATS\\gRPC_ATS.vi") | ||
| test_file = os.path.join(test_directory , "Tests.lst") | ||
| failed_test_results = "" | ||
| failed_test_results = 0 | ||
| with open(test_file, 'r') as file: | ||
| all_tests = file.read().splitlines() | ||
| for test in all_tests: | ||
| run_result = run_test(test_runner_vi, os.path.join(test_directory, test)) | ||
| # run_result will be None for PASSED tests | ||
| if(run_result != None): | ||
| failed_test_results += run_result | ||
| if (failed_test_results != ""): | ||
| _logger.exception(failed_test_results) | ||
|
Collaborator
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. Ok, that makes sense. _logger.exception takes a str but it expects to be called from an except block. |
||
| failed_test_results += 1 | ||
| if (failed_test_results != 0): | ||
| _logger.error(f"{failed_test_results} tests failed") | ||
| sys.exit(1) | ||
|
|
||
| def run_test(WrapperVI, testVI): | ||
| if os.path.exists(testVI): | ||
|
|
@@ -39,7 +40,7 @@ def run_test(WrapperVI, testVI): | |
| stderr=subprocess.PIPE, | ||
| shell=False) | ||
|
|
||
|
|
||
| try: | ||
| out, err = testResult.communicate(timeout=60) # TODO: find if this timeout can be eliminated | ||
| except subprocess.TimeoutExpired: | ||
|
|
@@ -51,8 +52,18 @@ def run_test(WrapperVI, testVI): | |
| _logger.debug(f"[PASSED] {testVI}") | ||
| return | ||
| else: | ||
| _logger.error(f"[FAILED] {testVI} has failed \n {err.decode()}") | ||
| return (err.decode() + "\n") | ||
| stdout_output = out.decode(errors="replace") | ||
| stderr_output = err.decode(errors="replace") | ||
| failed_test_output = f"[FAILED] {testVI} has failed\n" | ||
|
|
||
| if stdout_output.strip() != "": | ||
| failed_test_output += f"stdout:\n{stdout_output}\n" | ||
|
|
||
| if stderr_output.strip() != "": | ||
| failed_test_output += f"stderr:\n{stderr_output}\n" | ||
|
|
||
| _logger.error(failed_test_output) | ||
| return failed_test_output | ||
| else: | ||
| _logger.error(f"[FAILED] {testVI} \n {testVI} doesnot exist.") | ||
| return testVI + " doesnot exist. \n" | ||
|
|
||
Oops, something went wrong.
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.
@jasonmreding I think you probably need to merge main into this branch