An analytical solution of the Boussinesq equations for the motion of a viscous stably stratified fluid driven by a surface thermal forcing with large horizontal gradients (step changes) is obtained. This analytical solution is one of the few available for wall-bounded buoyancy-driven flows. The solution can be used to verify that computer codes for Boussinesq fluid system simulations are free of errors in formulation of wall boundary conditions and to evaluate the relative performances of competing numerical algorithms. Because the solution pertains to flows driven by a surface thermal forcing, one of its main applications may be for testing the no-slip, impermeable wall boundary conditions for the pressure Poisson equation. Examples of such tests are presented.