@@ -118,6 +118,8 @@ def x_ext(ext_name):
118
118
default = None , type = auto_write_fd ,
119
119
#nargs='?', const=sub.PIPE,
120
120
help = "Turn on logging for implementation A's rvfi-dii server (optionally specifying a file path)" )
121
+ parser .add_argument ('--implementation-A-host' , metavar = 'HOST' ,
122
+ help = "The remote host of implementation A's manual rvfi-dii server" )
121
123
# implementation args
122
124
parser .add_argument ('-b' , '--implementation-B' , metavar = 'IMP' , choices = known_rvfi_dii ,
123
125
default = 'sail' ,
@@ -128,6 +130,8 @@ def x_ext(ext_name):
128
130
default = None , type = auto_write_fd ,
129
131
#nargs='?', const=sub.PIPE,
130
132
help = "Turn on logging for implementation B's rvfi-dii server (optionally specifying a file path)" )
133
+ parser .add_argument ('--implementation-B-host' , metavar = 'HOST' ,
134
+ help = "The remote host of implementation B's manual rvfi-dii server" )
131
135
# verification engine args
132
136
parser .add_argument ('-e' , '--verification-engine' , metavar = 'VENG' , choices = known_vengine ,
133
137
default = 'QCVEngine' ,
@@ -521,7 +525,7 @@ def spawn_rvfi_dii_server(name, port, log, isa_def):
521
525
# spawn verification engine #
522
526
#############################
523
527
524
- def spawn_vengine (name , mport , iport , arch , log ):
528
+ def spawn_vengine (name , mport , iport , arch , log , more_args = [] ):
525
529
if name == 'QCVEngine-docker' :
526
530
cmd = ["docker" , "run" , "--rm" , "-t" , "-p" , f"{ mport } :{ mport } " , "-p" , f"{ iport } :{ iport } " ,
527
531
"ctsrd/testrig" , "./TestRIG/vengines/QuickCheckVEngine/dist/build/QCVEngine/QCVEngine" ,
@@ -535,6 +539,8 @@ def spawn_vengine(name, mport, iport, arch, log):
535
539
cmd = ["false" ]
536
540
useQCVEngine = False
537
541
542
+ cmd += more_args
543
+
538
544
if useQCVEngine :
539
545
if args .supported_features is not None :
540
546
QCVEngineArch = str (arch ) + "_" + args .supported_features
@@ -672,6 +678,20 @@ def handle_SIGINT(sig, frame):
672
678
if args .relaxed_comparison and args .strict_comparison :
673
679
print ('Cannot do both relaxed and strict comparison' )
674
680
exit (- 1 )
681
+
682
+ if args .implementation_A_host and not (args .implementation_A == "manual" ):
683
+ print ("Specifying host A is only possible for manual implementations" )
684
+ exit (- 1 )
685
+
686
+ if args .implementation_B_host and not (args .implementation_B == "manual" ):
687
+ print ("Specifying host B is only possible for manual implementations" )
688
+ exit (- 1 )
689
+
690
+ if (args .implementation_A_host or args .implementation_B_host ) \
691
+ and not (args .parallel_jobs == 1 ):
692
+ print ("Specifying implementation host requires no job parallelism" )
693
+ exit (- 1 )
694
+
675
695
# Allow --verification-archstring to override architecture
676
696
vengine_archstring = args .verification_archstring if args .verification_archstring else args .architecture
677
697
try :
@@ -729,6 +749,12 @@ def handle_SIGINT(sig, frame):
729
749
730
750
time .sleep (args .spawn_delay ) # small delay to give time to the spawned servers to be ready to listen
731
751
752
+ extra_vengine_args = []
753
+ if args .implementation_A_host :
754
+ extra_vengine_args += [ "-A" , args .implementation_A_host ]
755
+ if args .implementation_B_host :
756
+ extra_vengine_args += [ "-B" , args .implementation_B_host ]
757
+
732
758
for job in range (args .parallel_jobs ):
733
759
if a [job ] is not None and a [job ].poll () is not None :
734
760
print ("ERROR: Implementation A failed to start!" )
@@ -739,7 +765,8 @@ def handle_SIGINT(sig, frame):
739
765
print (" " .join (b [job ].args ), "failed with exit code" , b [job ].poll ())
740
766
exit (1 )
741
767
e .append (spawn_vengine (args .verification_engine , aports [job ], bports [job ],
742
- vengine_archstring , logs [job ].error_log ))
768
+ vengine_archstring , logs [job ].error_log ,
769
+ more_args = extra_vengine_args ))
743
770
744
771
# TODO support non-standard generator in parallel builds
745
772
generator .append (spawn_generator (args .generator , args .architecture ,
0 commit comments