Commit a7c97a65 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: hotfix for stability

  -- stdbuf -o0 seems to be causing segmentation fault
  -- using daemon instead of nohup
  -- also repeating several time "got sync" message and flushing stdout/stderr
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent bebb7172
......@@ -253,8 +253,9 @@ class SSHConnection():
# Launch eNB with the modified config file
self.command('source oaienv', '\$', 5)
self.command('cd cmake_targets', '\$', 5)
# Replacing with a nohup and a direct redirection of stdout to a file
self.command('echo ' + self.eNBPassword + ' | nohup sudo -S -E stdbuf -o0 ./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + ' > enb_' + SSH.testCase_id + '.log 2>&1 &', '\$', 5)
self.command('echo "./lte_build_oai/build/lte-softmodem -O ' + self.eNBSourceCodePath + '/' + ci_full_config_file + '" > ./my-lte-softmodem-run.sh ', '\$', 5)
self.command('chmod 775 ./my-lte-softmodem-run.sh ', '\$', 5)
self.command('echo ' + self.eNBPassword + ' | sudo -S -E daemon --inherit --unsafe --name=enb_daemon --chdir=' + self.eNBSourceCodePath + '/cmake_targets -o ' + self.eNBSourceCodePath + '/cmake_targets/enb_' + SSH.testCase_id + '.log ./my-lte-softmodem-run.sh', '\$', 5)
time.sleep(6)
doLoop = True
loopCounter = 10
......@@ -733,6 +734,9 @@ class SSHConnection():
def TerminateeNB(self):
self.open(self.eNBIPAddress, self.eNBUserName, self.eNBPassword)
self.command('cd ' + self.eNBSourceCodePath + '/cmake_targets', '\$', 5)
self.command('echo ' + self.eNBPassword + ' | sudo -S daemon --name=enb_daemon --stop', '\$', 5)
self.command('rm -f my-lte-softmodem-run.sh', '\$', 5)
self.command('echo ' + self.eNBPassword + ' | sudo -S killall --signal SIGINT lte-softmodem || true', '\$', 5)
time.sleep(5)
self.command('stdbuf -o0 ps -aux | grep -v grep | grep lte-softmodem', '\$', 5)
......
......@@ -913,7 +913,16 @@ static void wait_nfapi_init(char *thread_name) {
pthread_mutex_unlock(&nfapi_sync_mutex);
/*
* Raphael Defosseux: temporary workaround for CI
* -- Repeating the message thrice to make sure
* -- it is present during flush.
*/
printf( "NFAPI: got sync (%s)\n", thread_name);
printf( "NFAPI: got sync (%s)\n", thread_name);
printf( "NFAPI: got sync (%s)\n", thread_name);
fflush(stdout);
fflush(stderr);
}
int main( int argc, char **argv )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment