Fernando Alonso will test McLaren's 2019 Formula 1 car as part of a new role as team "ambassador", following his decision not to race in F1 this season.
The two-time world champion rejoined McLaren in 2015 but opted to step away from grand prix racing for 2019 following years of uncompetitive machinery, and an urge to compete elsewhere.
Alonso had already been confirmed to race for McLaren in this year's Indianapolis 500, but his much-speculated involvement in the F1 team's testing programme has now been firmed up as well.
He will drive at "selected tests to support the development of MCL34 and MCL35 for 2020", McLaren has confirmed.
McLaren will have four official test days during the season. Two of which must be completed by rookie drivers who have not competed in more than two grands prix, but Alonso would be free to drive on either of the other two days.
The team says Alonso will also advise the F1 team's drivers and engineers as part of a "wide-ranging" ambassadorial agreement.
"I said before I stopped racing in Formula 1 last year that I see myself with McLaren for a long time to come, so I am delighted at this new role and the ability to stay closely involved with the team I feel is my spiritual home," said Alonso.
"We have the Indianapolis 500 in May of course, which I am looking forward to immensely, but this is just the beginning of many things we can do together.
"I am particularly passionate about nurturing young talent, whether that's with my own team or helping the new generation of Formula 1 drivers at McLaren unlock their true potential.