This article proposes goodness-of-fit tests for dynamic regression models, where regressors are allowed to be only weakly exogenous and arbitrarily correlated with past shocks. The null hypothesis is stated in terms of the lack of serial correlation of the errors of the model. The tests are based on a linear transformation of a Bartlett's Tp-process of the residuals. This transformation approximates the martingale component of the process so that it converges weakly to the standard Brownian motion under the null hypothesis. One feature of our setup is that we do not require to specify the dynamic structure of the regressors. Due to this, the transformation employs a semi-parametric correction that does not restrict the class of local altern...