mirror of
https://github.com/0glabs/0g-storage-node.git
synced 2024-12-26 08:15:17 +00:00
enhance py test framework to support more args (#19)
This commit is contained in:
parent
80cebd4c70
commit
8f328a9eab
@ -175,9 +175,7 @@ class TestFramework:
|
|||||||
for node in self.nodes:
|
for node in self.nodes:
|
||||||
node.wait_for_rpc_connection()
|
node.wait_for_rpc_connection()
|
||||||
|
|
||||||
def __parse_arguments(self):
|
def add_arguments(self, parser: argparse.ArgumentParser):
|
||||||
parser = argparse.ArgumentParser(usage="%(prog)s [options]")
|
|
||||||
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--conflux-binary",
|
"--conflux-binary",
|
||||||
dest="conflux",
|
dest="conflux",
|
||||||
@ -265,8 +263,6 @@ class TestFramework:
|
|||||||
help="Attach a python debugger if test fails",
|
help="Attach a python debugger if test fails",
|
||||||
)
|
)
|
||||||
|
|
||||||
self.options = parser.parse_args()
|
|
||||||
|
|
||||||
def __start_logging(self):
|
def __start_logging(self):
|
||||||
# Add logger and logging handlers
|
# Add logger and logging handlers
|
||||||
self.log = logging.getLogger("TestFramework")
|
self.log = logging.getLogger("TestFramework")
|
||||||
@ -391,7 +387,9 @@ class TestFramework:
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def main(self):
|
def main(self):
|
||||||
self.__parse_arguments()
|
parser = argparse.ArgumentParser(usage="%(prog)s [options]")
|
||||||
|
self.add_arguments(parser)
|
||||||
|
self.options = parser.parse_args()
|
||||||
PortMin.n = self.options.port_min
|
PortMin.n = self.options.port_min
|
||||||
|
|
||||||
# Set up temp directory and start logging
|
# Set up temp directory and start logging
|
||||||
|
Loading…
Reference in New Issue
Block a user