@@ -141,9 +141,16 @@ def subrun(cmd, test_dir=False, silent=False, ignore_failure=False, color=False)
141
141
return (output , r .returncode )
142
142
143
143
144
+ def sync ():
145
+ # Ensure that e.g. config updates are sync'd before running make - have occasionally observed errors
146
+ # that might have come from make not seeing the changes to the config that have just been written.
147
+ subrun (["sync" , ROOT ], silent = True )
148
+
149
+
144
150
def clean ():
145
151
log ("make clean" )
146
152
subrun (["make" , "clean" ], silent = True )
153
+ sync ()
147
154
148
155
149
156
def toolchain_exes (target ):
@@ -578,6 +585,8 @@ def configure_options(target):
578
585
backup_config_options (crypto_config_file )
579
586
log (f"cp { new_crypto_config } { crypto_config_file } " )
580
587
shutil .copy (new_crypto_config , crypto_config_file )
588
+
589
+ sync ()
581
590
582
591
# apply bulk config.py settings to main config file
583
592
for config in config_py_groups :
@@ -609,6 +618,8 @@ def configure_options(target):
609
618
if crypto_config_file is None :
610
619
crypto_config_file = get_crypto_config_file ()
611
620
set_config_option (action , config , crypto_config_file , silent = False )
621
+
622
+ sync ()
612
623
613
624
614
625
def flags_to_hr_str (flags ):
@@ -709,6 +720,8 @@ def build(target, tests):
709
720
log (f"{ make_log } -C { TEST_DIR } { ' ' .join (tests )} { flags_to_hr_str (flags )} " )
710
721
subrun (make_cmd + tests + flags , test_dir = True , silent = True , color = True )
711
722
723
+ sync ()
724
+
712
725
if args .tests :
713
726
log (subrun (["file" , tests [0 ]], test_dir = True , silent = True )[0 ].strip ())
714
727
log ("ok" )
0 commit comments