Skip to content

Commit

Permalink
integration-tests: allow inclusive and exclusive options together (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
lupin012 authored Oct 24, 2024
1 parent 17b9780 commit 48556b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Launch an automated test sequence on Silkworm RpcDaemon (aka Silkrpc) or Erigon
-s,--start-from-test: <test_number>: run tests starting from input
-t,--run-single-test: <test_number>: run single test
-d,--compare-erigon-rpcdaemon: send requests also to the reference daemon e.g.: Erigon RpcDaemon
-T,--transport_type: <http,http_comp,websocket,websocket_comp>
-T,--transport_type: <http,http_comp,https,websocket,websocket_comp>
-k,--jwt: authentication token file
-a,--api-list-with: <apis>: run all tests of the specified API that contains string (e.g.: eth_,debug_)
-A,--api-list: <apis>: run all tests of the specified API that match full name (e.g.: eth_call,eth_getLogs)
Expand Down
12 changes: 1 addition & 11 deletions integration/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,6 @@ def select_user_options(self, argv):
elif option in ("-s", "--start-from-test"):
self.start_test = int(optarg)
elif option in ("-a", "--api-list-with"):
if self.exclude_api_list != "":
print("Error on options: "
"-a/--api-list-with is not compatible with -X/--exclude-test-list")
usage(argv)
sys.exit(1)
self.testing_apis_with = optarg
elif option in ("-A", "--api-list"):
if self.exclude_api_list != "":
Expand Down Expand Up @@ -413,11 +408,6 @@ def select_user_options(self, argv):
self.json_dir = "./" + self.net + "/"
self.output_dir = self.json_dir + self.results_dir + "/"
elif option in ("-x", "--exclude-api-list"):
if self.req_test_number != -1 or self.testing_apis != "" or self.testing_apis_with != "":
print("Error in options: "
"-x/--exclude-api-list is not compatible with -a/--api-list-with or -A/--apis-list or -t/--run-single-test")
usage(argv)
sys.exit(1)
self.exclude_api_list = optarg
elif option in ("-X", "--exclude-test-list"):
if self.req_test_number != -1:
Expand Down Expand Up @@ -831,7 +821,7 @@ def main(argv) -> int:
if config.display_only_fail == 0 and config.req_test_number != "":
file = json_test_full_name.ljust(60)
print(f"{test_number_in_any_loop:04d}. {file} Skipped")
tests_not_executed = tests_not_executed + 1
tests_not_executed = tests_not_executed + 1
else:
# runs all tests or
# runs single global test
Expand Down

0 comments on commit 48556b0

Please sign in to comment.