Ugandan President Yoweri Museveni made announcement after more than 20 of drivers entering the country from Kenya tested positive for Covid-19, the respiratory illness caused by the virus.
Mandatory testing for Covid-19 for lorry drivers began earlier this week has been causing huge traffic jams on the border between Kenya and Uganda.
The route from the Kenyan port city of Mombasa is vital for transporting food, medicine and other essential goods to Uganda, Rwanda, South Sudan and the east of the Democratic Republic of Congo.
President Museveni said stopping cargo traffic altogether would be suicidal.
He also spoke out against growing hostility towards truck drivers by some Ugandans who worry they could be transmitting the disease.