Re: [Fuego] Time sync
"Bird, Tim" <[email protected]> Fri, 22 Apr 2022 21:15:12 +0000
| Newsgroups | dev.linux.lists.fuego |
|---|---|
| Message-ID | <BYAPR13MB2503C0EAF17D8E9B4221851BFDF79@BYAPR13MB2503.namprd13.prod.outlook.com> |
Muk, I decided to write a test to implement the feature you described. It is called Functional.time_sync_from_host, and it is now available=20 in the fuego-core repository, if you'd like to use it. If you do use it, please let me know if it provides a solution for the issue you described. I just pushed it to the fuego-core repository, so you'll need to do a 'git pull' to get it. Alternatively, you can also see it online here: https://bitbucket.org/fuegotest/fuego-core/src/master/tests/Functional.sync= _time_from_host/ Regards, -- Tim > -----Original Message----- > From: Bird, Tim >=20 > > -----Original Message----- > > From: Fuego <[email protected]> On Behalf Of Muk = Anc > > > > Hello all, > > I am looking for some information about time syncing the fuego tests wi= th DUT logs. Our DUT has a RTC, but loses time info on every > > reboot. Is there a way I can set the time on the board from Fuego? This= will help us generate timestamped logs on DUT and thus sync the > > board logs to the Fuego logs. >=20 > This is possible inside Fuego. >=20 > You can do something like this, from inside any test: >=20 > cmd "date $(date +%m%d%H%M%Y.%S)" >=20 > This will get the date from the host machine, and then executes date on t= he DUT > using the resulting string. If the DUT is using NTP or systemd's timesyn= cd, then > this might not work. (But I presume that's not the case if the board doe= sn't > have the correct time on boot). >=20 > You can put this command at the end of the test_deploy() function in a fu= ego_test.sh script, > or maybe at the beginning of the test_run() function. >=20 > This would cause the synchronization to happen for the test you put it in= . This will work > if you have a pre-determined set of tests. You could add this line to > the first test your run after rebooting. Or you could make a test specif= ically to perform > this operation, and run it before other tests. >=20 > If you want to perform the time synchronization for every test, then ther= e are ways to > add this to an overlay function, and trigger it using a special value for= DISTRIB in the > board file. >=20 > This is a bit complicated, but let me know if you'd like to do this, and = I'll write some > instructions. >=20 > I hope this helps. > -- Tim