17
17
18
18
# Runs the CI pipeline.
19
19
def run_pipeline (
20
- log_directory : str ,
21
- repository : str , branch : str , libos : str , is_debug : bool , server : str , client : str ,
22
- test_unit : bool , test_system : str , server_addr : str , client_addr : str , delay : float , config_path : str ,
20
+ log_directory : str , repository : str , branch : str , libos : str , is_debug :
21
+ bool , server : str , client : str , test_unit : bool , test_integration : bool ,
22
+ test_system : str , server_addr : str , client_addr : str , delay : float , config_path : str ,
23
23
output_dir : str , enable_nfs : bool , install_prefix : str ) -> int :
24
24
is_sudo : bool = True if libos == "catnip" or libos == "catpowder" or libos == "catloop" else False
25
25
status : dict [str , bool ] = {}
@@ -67,7 +67,11 @@ def run_pipeline(
67
67
status ["unit_tests" ] = True
68
68
status ["unit_tests" ] &= factory .unit_test (test_name = "test-unit-rust" ).execute ()
69
69
status ["unit_tests" ] &= factory .unit_test (test_name = "test-unit-c" ).execute ()
70
- if libos == "catnap" or libos == "catloop" :
70
+
71
+ # STEP 4: Run integration tests.
72
+ if test_integration :
73
+ if status ["checkout" ] and status ["compile" ]:
74
+ if libos == "catnap" or libos == "catnapw" or libos == "catloop" :
71
75
status ["integration_tests" ] = factory .integration_test ().execute ()
72
76
elif libos == "catmem" :
73
77
status ["integration_tests" ] = factory .integration_test ("standalone" ).execute ()
@@ -76,7 +80,7 @@ def run_pipeline(
76
80
status ["integration_tests" ] = factory .integration_test ("push-wait-async" ).execute ()
77
81
status ["integration_tests" ] = factory .integration_test ("pop-wait-async" ).execute ()
78
82
79
- # STEP 4 : Run system tests.
83
+ # STEP 5 : Run system tests.
80
84
if test_system and config ["platform" ] == "linux" :
81
85
if status ["checkout" ] and status ["compile" ]:
82
86
ci_map = read_yaml (libos )
@@ -240,6 +244,8 @@ def read_args() -> argparse.Namespace:
240
244
# Test options.
241
245
parser .add_argument ("--test-unit" , action = 'store_true' ,
242
246
required = False , help = "run unit tests" )
247
+ parser .add_argument ("--test-integration" , action = 'store_true' ,
248
+ required = False , help = "run integration tests" )
243
249
parser .add_argument ("--test-system" , type = str ,
244
250
required = False , help = "run system tests" )
245
251
parser .add_argument ("--test-redis" , action = 'store_true' , required = False , help = "run redis tests" )
@@ -283,6 +289,7 @@ def main():
283
289
284
290
# Extract test options.
285
291
test_unit : bool = args .test_unit
292
+ test_integration : bool = args .test_integration
286
293
test_system : str = args .test_system
287
294
test_redis : bool = args .test_redis
288
295
server_addr : str = args .server_addr
@@ -309,7 +316,7 @@ def main():
309
316
mkdir (log_directory )
310
317
311
318
status : dict = run_pipeline (log_directory , repository , branch , libos , is_debug , server ,
312
- client , test_unit , test_system , server_addr ,
319
+ client , test_unit , test_integration , test_system , server_addr ,
313
320
client_addr , delay , config_path , output_dir , enable_nfs , install_prefix )
314
321
315
322
if test_redis :
0 commit comments