makekconfig.py: Exit with an error if there was a compile error
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
4a498d92c5
commit
1e4ac2972d
|
@ -16,7 +16,7 @@ Args = parser.parse_args()
|
||||||
Kconfig = pathlib.Path(Args.kconfig[0])
|
Kconfig = pathlib.Path(Args.kconfig[0])
|
||||||
Config = pathlib.Path("scripts/config").absolute()
|
Config = pathlib.Path("scripts/config").absolute()
|
||||||
Make = pathlib.Path("~/bin/makelinux.zsh").expanduser()
|
Make = pathlib.Path("~/bin/makelinux.zsh").expanduser()
|
||||||
MakeArg = Args.makeargs + ([ f"{str(Kconfig.parent)}/" ] if Args.quick else [ ])
|
MakeArg = Args.makeargs + ([ f"{str(Kconfig)}/" ] if Args.quick else [ ])
|
||||||
Options = dict()
|
Options = dict()
|
||||||
Colors = { "n" : "grey", "y" : "green", "m" : "cyan" }
|
Colors = { "n" : "grey", "y" : "green", "m" : "cyan" }
|
||||||
Attrs = { "y" : [ "bold" ], "m" : [ "bold" ] }
|
Attrs = { "y" : [ "bold" ], "m" : [ "bold" ] }
|
||||||
|
@ -80,7 +80,10 @@ class Option:
|
||||||
termcolor.cprint(self.state, Colors.get(self.state), attrs=["bold", "dark"])
|
termcolor.cprint(self.state, Colors.get(self.state), attrs=["bold", "dark"])
|
||||||
|
|
||||||
def print_result(self):
|
def print_result(self):
|
||||||
result = ("Success", "green") if self.res == True else ("Failed", "red")
|
match self.res:
|
||||||
|
case True: result = ("Success", "green")
|
||||||
|
case False: result = ("Failed", "red")
|
||||||
|
case _: result = ("Not Run", "yellow")
|
||||||
termcolor.cprint(" " + self.name + " ", Colors.get(self.state), attrs=["bold", "dark"], end="")
|
termcolor.cprint(" " + self.name + " ", Colors.get(self.state), attrs=["bold", "dark"], end="")
|
||||||
termcolor.cprint(" " * (NameLen - len(self.name)), "grey", attrs=["underline"], end="")
|
termcolor.cprint(" " * (NameLen - len(self.name)), "grey", attrs=["underline"], end="")
|
||||||
termcolor.cprint(" " + result[0], result[1], attrs=["bold", "dark"])
|
termcolor.cprint(" " + result[0], result[1], attrs=["bold", "dark"])
|
||||||
|
@ -97,6 +100,7 @@ def make_opt(option):
|
||||||
option.enable()
|
option.enable()
|
||||||
print()
|
print()
|
||||||
for o in options: o.print()
|
for o in options: o.print()
|
||||||
|
option.res = False
|
||||||
subprocess.run([ Make ] + [ "olddefconfig" ]).check_returncode()
|
subprocess.run([ Make ] + [ "olddefconfig" ]).check_returncode()
|
||||||
subprocess.run([ Make ] + MakeArg).check_returncode()
|
subprocess.run([ Make ] + MakeArg).check_returncode()
|
||||||
option.res = True
|
option.res = True
|
||||||
|
@ -110,3 +114,4 @@ except Exception as e:
|
||||||
finally:
|
finally:
|
||||||
termcolor.cprint(f"\nKconfig Results:", "yellow", attrs=["bold", "underline"])
|
termcolor.cprint(f"\nKconfig Results:", "yellow", attrs=["bold", "underline"])
|
||||||
for opt in options: opt.print_result()
|
for opt in options: opt.print_result()
|
||||||
|
if False in [ opt.res for opt in options ]: sys.exit(1)
|
||||||
|
|
|
@ -16,6 +16,7 @@ tags=($(python $BIN/colors/vm.py $CLIENT $SERVER))
|
||||||
$BIN/rdma.zsh $RDMA $CLIENT $SERVER
|
$BIN/rdma.zsh $RDMA $CLIENT $SERVER
|
||||||
|
|
||||||
ssh $SERVER "rping -s -C 1 -v 2>&1" | sed "s/^/${tags[2]} /" &
|
ssh $SERVER "rping -s -C 1 -v 2>&1" | sed "s/^/${tags[2]} /" &
|
||||||
|
sleep 1
|
||||||
ssh $CLIENT "rping -c -C 1 -S 40 -v -a $SERVER 2>&1" | sed "s/^/${tags[1]} /"
|
ssh $CLIENT "rping -c -C 1 -S 40 -v -a $SERVER 2>&1" | sed "s/^/${tags[1]} /"
|
||||||
|
|
||||||
wait $(jobs -pr)
|
wait $(jobs -pr)
|
||||||
|
|
Loading…
Reference in New Issue