[SPARK-13023][PROJECT INFRA] Fix handling of root module in modules_to_test()
[SPARK-13023][PROJECT INFRA] Fix handling of root module in modules_to_test()

There's a minor bug in how we handle the `root` module in the `modules_to_test()` function in `dev/run-tests.py`: since `root` now depends on `build` (since every test needs to run on any build test), we now need to check for the presence of root in `modules_to_test` instead of `changed_modules`.

Author: Josh Rosen <joshrosen@databricks.com>

Closes #10933 from JoshRosen/build-module-fix.

szhem/spark,ajaysaini725/spark,JoshRosen/spark,guoxiaolongzte/spark,narahari92/spark,dongjoon-hyun/spark,yanboliang/spark,zhouyejoe/spark,michalsenkyr/spark,map222/spark,maropu/spark,ConeyLiu/spark,WindCanDie/spark,Aegeaner/spark,ericvandenbergfb/spark,mdespriee/spark,JerryLead/spark,taroplus/spark,Panos-Bletsos/spark-cost-model-optimizer,MLnick/spark,shaneknapp/spark,actuaryzhang/spark,huang1900/spark,bravo-zhang/spark,JoshRosen/spark,pgandhi999/spark,actuaryzhang/spark,esi-mineset/spark,chuckchen/spark,wangyum/spark,highfei2011/spark,jrshust/spark,UndeadBaneGitHub/spark,techaddict/spark,goldmedal/spark,dhruve/spark,byakuinss/spark,rezasafi/spark,nilsgrabbert/spark,joseph-torres/spark,jianran/spark,bdrillard/spark,esi-mineset/spark,akopich/spark,ueshin/apache-spark,brad-kaiser/spark,brad-kaiser/spark,gioenn/xSpark,patrick-nicholson/spark,minixalpha/spark,shubhamchopra/spark,metamx/spark,narahari92/spark,aosagie/spark,ahnqirage/spark,wangyum/spark,mahak/spark,andrewor14/spark,HyukjinKwon/spark,Aegeaner/spark,nlalevee/spark,someorz/spark,srowen/spark,facaiy/spark,mdespriee/spark,rednaxelafx/apache-spark,jianran/spark,UndeadBaneGitHub/spark,ericvandenbergfb/spark,aray/spark,janewangfb/spark,aokolnychyi/spark,patrick-nicholson/spark,witgo/spark,chuckchen/spark,skonto/spark,tengpeng/spark,apache-spark-on-k8s/spark,lxsmnv/spark,rikima/spark,caneGuy/spark,sureshthalamati/spark,panfengfeng/spark,mike0sv/spark,saturday-shi/spark,debugger87/spark,setjet/spark,cin/spark,holdenk/spark,cloud-fan/spark,yanboliang/spark,janewangfb/spark,WindCanDie/spark,zuotingbing/spark,actuaryzhang/spark,MLnick/spark,mdespriee/spark,sachintyagi22/spark,map222/spark,actuaryzhang/spark,liutang123/spark,wzhfy/spark,liutang123/spark,patrick-nicholson/spark,kissmetrics/spark,akopich/spark,setjet/spark,rednaxelafx/apache-spark,xuanyuanking/spark,zzcclp/spark,LantaoJin/spark,sahilTakiar/spark,facaiy/spark,vinodkc/spark,WeichenXu123/spark,ahnqirage/spark,jrshust/spark,aosagie/spark,dbtsai/spark,rekhajoshm/spark,andrewor14/spark,someorz/spark,akopich/spark,JerryLead/spark,mike0sv/spark,saltstar/spark,mzl9039/spark,icexelloss/spark,spark-test/spark,map222/spark,yanboliang/spark,zero323/spark,holdenk/spark,panfengfeng/spark,adrian-ionescu/apache-spark,mahak/spark,caneGuy/spark,1haodian/spark,janewangfb/spark,ddna1021/spark,rekhajoshm/spark,shaneknapp/spark,xflin/spark,JoshRosen/spark,brad-kaiser/spark,apache/spark,mike0sv/spark,facaiy/spark,bOOm-X/spark,maropu/spark,rednaxelafx/apache-spark,skonto/spark,LantaoJin/spark,ueshin/apache-spark,darionyaphet/spark,kevinyu98/spark,hvanhovell/spark,huang1900/spark,alunarbeach/spark,WeichenXu123/spark,eyalfa/spark,guoxiaolongzte/spark,guoxiaolongzte/spark,WeichenXu123/spark,bOOm-X/spark,tejasapatil/spark,techaddict/spark,chuckchen/spark,sureshthalamati/spark,rekhajoshm/spark,joseph-torres/spark,dbtsai/spark,alunarbeach/spark,jlopezmalla/spark,xflin/spark,big-pegasus/spark,maropu/spark,saltstar/spark,maropu/spark,witgo/spark,tengpeng/spark,xflin/spark,loneknightpy/spark,apache/spark,akopich/spark,ptkool/spark,ptkool/spark,sahilTakiar/spark,ibm-research-ireland/sparkoscope,kissmetrics/spark,stanzhai/spark,1haodian/spark,loneknightpy/spark,spark-test/spark,eyalfa/spark,icexelloss/spark,dhruve/spark,zhouyejoe/spark,szhem/spark,saturday-shi/spark,SnappyDataInc/spark,aosagie/spark,wangmiao1981/spark,hvanhovell/spark,kevinyu98/spark,setjet/spark,ron8hu/spark,ConeyLiu/spark,sachintyagi22/spark,lxsmnv/spark,MLnick/spark,goldmedal/spark,SHASHANKB/spark,kimoonkim/spark,szhem/spark,spark-test/spark,goldmedal/spark,pgandhi999/spark,yanboliang/spark,jrshust/spark,ericvandenbergfb/spark,hvanhovell/spark,kevinyu98/spark,taroplus/spark,zzcclp/spark,JoshRosen/spark,hvanhovell/spark,saltstar/spark,caneGuy/spark,SHASHANKB/spark,taroplus/spark,ddna1021/spark,skonto/spark,byakuinss/spark,wzhfy/spark,highfei2011/spark,dhruve/spark,jkbradley/spark,sureshthalamati/spark,jrshust/spark,someorz/spark,guoxiaolongzte/spark,metamx/spark,michalsenkyr/spark,ericvandenbergfb/spark,nilsgrabbert/spark,dhruve/spark,bdrillard/spark,kiszk/spark,mdespriee/spark,srowen/spark,cin/spark,byakuinss/spark,jiangxb1987/spark,ddna1021/spark,patrick-nicholson/spark,tengpeng/spark,liutang123/spark,markhamstra/spark,highfei2011/spark,caneGuy/spark,mahak/spark,big-pegasus/spark,facaiy/spark,metamx/spark,someorz/spark,nlalevee/spark,xuanyuanking/spark,sahilTakiar/spark,alunarbeach/spark,ron8hu/spark,narahari92/spark,jrshust/spark,minixalpha/spark,publicRoman/spark,mzl9039/spark,taroplus/spark,joseph-torres/spark,caneGuy/spark,SHASHANKB/spark,brad-kaiser/spark,darionyaphet/spark,andrewor14/spark,markhamstra/spark,HyukjinKwon/spark,cloud-fan/spark,WindCanDie/spark,michalsenkyr/spark,holdenk/spark,byakuinss/spark,mike0sv/spark,zzcclp/spark,ajaysaini725/spark,ioana-delaney/spark,xflin/spark,ConeyLiu/spark,ahnqirage/spark,minixalpha/spark,icexelloss/spark,SnappyDataInc/spark,kiszk/spark,patrick-nicholson/spark,szhem/spark,saturday-shi/spark,wangyum/spark,tejasapatil/spark,zuotingbing/spark,ConeyLiu/spark,shuangshuangwang/spark,liyichao/spark,icexelloss/spark,WindCanDie/spark,MLnick/spark,zero323/spark,actuaryzhang/spark,markhamstra/spark,adrian-ionescu/apache-spark,lxsmnv/spark,srowen/spark,metamx/spark,chuckchen/spark,debugger87/spark,wangyum/spark,joseph-torres/spark,sachintyagi22/spark,eyalfa/spark,janewangfb/spark,rezasafi/spark,milliman/spark,spark-test/spark,nchammas/spark,janewangfb/spark,wzhfy/spark,sahilTakiar/spark,xflin/spark,mdespriee/spark,shaneknapp/spark,Panos-Bletsos/spark-cost-model-optimizer,setjet/spark,wzhfy/spark,ddna1021/spark,kimoonkim/spark,kimoonkim/spark,JoshRosen/spark,ajaysaini725/spark,srowen/spark,saturday-shi/spark,rekhajoshm/spark,gengliangwang/spark,xuanyuanking/spark,ahnqirage/spark,kevinyu98/spark,apache-spark-on-k8s/spark,1haodian/spark,jiangxb1987/spark,ibm-research-ireland/sparkoscope,rezasafi/spark,ajaysaini725/spark,kimoonkim/spark,andrewor14/spark,aokolnychyi/spark,kevinyu98/spark,jianran/spark,lvdongr/spark,janewangfb/spark,WeichenXu123/spark,adrian-ionescu/apache-spark,panfengfeng/spark,dbtsai/spark,loneknightpy/spark,darionyaphet/spark,pgandhi999/spark,ddna1021/spark,skonto/spark,spark-test/spark,apache/spark,panfengfeng/spark,wangmiao1981/spark,kissmetrics/spark,joseph-torres/spark,apache-spark-on-k8s/spark,huang1900/spark,facaiy/spark,zhouyejoe/spark,ioana-delaney/spark,aray/spark,nchammas/spark,debugger87/spark,lvdongr/spark,bOOm-X/spark,zzcclp/spark,rikima/spark,someorz/spark,kimoonkim/spark,taroplus/spark,zzcclp/spark,bravo-zhang/spark,gioenn/xSpark,eyalfa/spark,shuangshuangwang/spark,UndeadBaneGitHub/spark,MLnick/spark,gioenn/xSpark,wzhfy/spark,sureshthalamati/spark,witgo/spark,ajaysaini725/spark,jianran/spark,kevinyu98/spark,ron8hu/spark,poffuomo/spark,lvdongr/spark,srowen/spark,shuangshuangwang/spark,zzcclp/spark,szhem/spark,Panos-Bletsos/spark-cost-model-optimizer,aray/spark,rezasafi/spark,andrewor14/spark,kiszk/spark,poffuomo/spark,guoxiaolongzte/spark,aokolnychyi/spark,ibm-research-ireland/sparkoscope,techaddict/spark,ioana-delaney/spark,zero323/spark,loneknightpy/spark,tengpeng/spark,dbtsai/spark,ConeyLiu/spark,lvdongr/spark,icexelloss/spark,ron8hu/spark,mahak/spark,nilsgrabbert/spark,taroplus/spark,aray/spark,yanboliang/spark,bOOm-X/spark,sachintyagi22/spark,akopich/spark,liyichao/spark,skonto/spark,WindCanDie/spark,ibm-research-ireland/sparkoscope,michalsenkyr/spark,shaneknapp/spark,zero323/spark,shuangshuangwang/spark,holdenk/spark,jkbradley/spark,pgandhi999/spark,gioenn/xSpark,stanzhai/spark,adrian-ionescu/apache-spark,goldmedal/spark,guoxiaolongzte/spark,poffuomo/spark,kiszk/spark,hhbyyh/spark,poffuomo/spark,MLnick/spark,aokolnychyi/spark,bOOm-X/spark,shubhamchopra/spark,wangmiao1981/spark,shaneknapp/spark,caneGuy/spark,techaddict/spark,goldmedal/spark,stanzhai/spark,markhamstra/spark,WindCanDie/spark,jlopezmalla/spark,ioana-delaney/spark,ibm-research-ireland/sparkoscope,zzcclp/spark,JerryLead/spark,dhruve/spark,adrian-ionescu/apache-spark,bdrillard/spark,kissmetrics/spark,joseph-torres/spark,zhouyejoe/spark,wangmiao1981/spark,map222/spark,rekhajoshm/spark,MLnick/spark,poffuomo/spark,techaddict/spark,bravo-zhang/spark,SnappyDataInc/spark,taroplus/spark,publicRoman/spark,dongjoon-hyun/spark,minixalpha/spark,xuanyuanking/spark,big-pegasus/spark,esi-mineset/spark,cloud-fan/spark,aosagie/spark,cin/spark,highfei2011/spark,rikima/spark,michalsenkyr/spark,esi-mineset/spark,nlalevee/spark,sachintyagi22/spark,cloud-fan/spark,ibm-research-ireland/sparkoscope,witgo/spark,sachintyagi22/spark,ddna1021/spark,rednaxelafx/apache-spark,apache-spark-on-k8s/spark,tejasapatil/spark,zuotingbing/spark,stanzhai/spark,icexelloss/spark,shubhamchopra/spark,BryanCutler/spark,LantaoJin/spark,aosagie/spark,dhruve/spark,sureshthalamati/spark,BryanCutler/spark,pgandhi999/spark,big-pegasus/spark,zero323/spark,pgandhi999/spark,kiszk/spark,skonto/spark,eyalfa/spark,wzhfy/spark,szhem/spark,ron8hu/spark,hhbyyh/spark,nlalevee/spark,zuotingbing/spark,rikima/spark,lxsmnv/spark,shubhamchopra/spark,vinodkc/spark,pgandhi999/spark,zuotingbing/spark,zuotingbing/spark,cin/spark,spark-test/spark,apache/spark,publicRoman/spark,LantaoJin/spark,dbtsai/spark,mike0sv/spark,JerryLead/spark,sahilTakiar/spark,SnappyDataInc/spark,goldmedal/spark,hvanhovell/spark,zuotingbing/spark,hhbyyh/spark,vinodkc/spark,jkbradley/spark,jianran/spark,shuangshuangwang/spark,shuangshuangwang/spark,wangyum/spark,sachintyagi22/spark,witgo/spark,JoshRosen/spark,poffuomo/spark,JoshRosen/spark,ioana-delaney/spark,bdrillard/spark,eyalfa/spark,jkbradley/spark,caneGuy/spark,hhbyyh/spark,chuckchen/spark,byakuinss/spark,byakuinss/spark,jlopezmalla/spark,nchammas/spark,dbtsai/spark,Aegeaner/spark,jrshust/spark,mzl9039/spark,SHASHANKB/spark,Panos-Bletsos/spark-cost-model-optimizer,rikima/spark,ptkool/spark,kimoonkim/spark,huang1900/spark,nlalevee/spark,kissmetrics/spark,skonto/spark,gengliangwang/spark,gioenn/xSpark,lvdongr/spark,saltstar/spark,cloud-fan/spark,SnappyDataInc/spark,stanzhai/spark,UndeadBaneGitHub/spark,minixalpha/spark,alunarbeach/spark,rednaxelafx/apache-spark,spark-test/spark,huang1900/spark,ptkool/spark,facaiy/spark,aray/spark,HyukjinKwon/spark,highfei2011/spark,saltstar/spark,wzhfy/spark,jianran/spark,BryanCutler/spark,SHASHANKB/spark,bravo-zhang/spark,guoxiaolongzte/spark,apache-spark-on-k8s/spark,liyichao/spark,narahari92/spark,jiangxb1987/spark,debugger87/spark,LantaoJin/spark,ioana-delaney/spark,alunarbeach/spark,ron8hu/spark,UndeadBaneGitHub/spark,facaiy/spark,srowen/spark,milliman/spark,bdrillard/spark,bravo-zhang/spark,michalsenkyr/spark,jlopezmalla/spark,ueshin/apache-spark,Aegeaner/spark,akopich/spark,hhbyyh/spark,BryanCutler/spark,SnappyDataInc/spark,cin/spark,actuaryzhang/spark,xflin/spark,liyichao/spark,nilsgrabbert/spark,mahak/spark,dongjoon-hyun/spark,ptkool/spark,cloud-fan/spark,liutang123/spark,HyukjinKwon/spark,mike0sv/spark,shaneknapp/spark,ConeyLiu/spark,akopich/spark,adrian-ionescu/apache-spark,metamx/spark,shubhamchopra/spark,tengpeng/spark,xuanyuanking/spark,aokolnychyi/spark,debugger87/spark,mahak/spark,jiangxb1987/spark,yanboliang/spark,techaddict/spark,vinodkc/spark,tejasapatil/spark,cin/spark,sahilTakiar/spark,esi-mineset/spark,ajaysaini725/spark,UndeadBaneGitHub/spark,dongjoon-hyun/spark,alunarbeach/spark,1haodian/spark,sahilTakiar/spark,dbtsai/spark,BryanCutler/spark,gioenn/xSpark,ahnqirage/spark,SHASHANKB/spark,maropu/spark,aosagie/spark,publicRoman/spark,milliman/spark,UndeadBaneGitHub/spark,jrshust/spark,darionyaphet/spark,andrewor14/spark,1haodian/spark,dongjoon-hyun/spark,rednaxelafx/apache-spark,icexelloss/spark,cloud-fan/spark,ptkool/spark,JerryLead/spark,chuckchen/spark,brad-kaiser/spark,sureshthalamati/spark,nchammas/spark,rikima/spark,lxsmnv/spark,apache-spark-on-k8s/spark,ahnqirage/spark,aray/spark,gengliangwang/spark,ueshin/apache-spark,map222/spark,wangmiao1981/spark,mdespriee/spark,patrick-nicholson/spark,adrian-ionescu/apache-spark,xuanyuanking/spark,mzl9039/spark,saltstar/spark,hvanhovell/spark,milliman/spark,darionyaphet/spark,mike0sv/spark,wangyum/spark,mdespriee/spark,chuckchen/spark,rednaxelafx/apache-spark,witgo/spark,bravo-zhang/spark,wangmiao1981/spark,map222/spark,stanzhai/spark,milliman/spark,apache/spark,saltstar/spark,SnappyDataInc/spark,Panos-Bletsos/spark-cost-model-optimizer,Panos-Bletsos/spark-cost-model-optimizer,hhbyyh/spark,narahari92/spark,BryanCutler/spark,bOOm-X/spark,Panos-Bletsos/spark-cost-model-optimizer,jkbradley/spark,dongjoon-hyun/spark,goldmedal/spark,shuangshuangwang/spark,setjet/spark,setjet/spark,liyichao/spark,gengliangwang/spark,stanzhai/spark,witgo/spark,byakuinss/spark,actuaryzhang/spark,panfengfeng/spark,kimoonkim/spark,JerryLead/spark,apache-spark-on-k8s/spark,liutang123/spark,Aegeaner/spark,shubhamchopra/spark,map222/spark,milliman/spark,tejasapatil/spark,tengpeng/spark,wangmiao1981/spark,loneknightpy/spark,janewangfb/spark,publicRoman/spark,esi-mineset/spark,shubhamchopra/spark,michalsenkyr/spark,ioana-delaney/spark,LantaoJin/spark,jianran/spark,maropu/spark,darionyaphet/spark,darionyaphet/spark,apache/spark,liyichao/spark,ConeyLiu/spark,WeichenXu123/spark,jiangxb1987/spark,bOOm-X/spark,markhamstra/spark,jiangxb1987/spark,HyukjinKwon/spark,vinodkc/spark,shaneknapp/spark,mzl9039/spark,liutang123/spark,zhouyejoe/spark,minixalpha/spark,kevinyu98/spark,joseph-torres/spark,dhruve/spark,ibm-research-ireland/sparkoscope,lxsmnv/spark,zhouyejoe/spark,kissmetrics/spark,lvdongr/spark,huang1900/spark,dongjoon-hyun/spark,panfengfeng/spark,LantaoJin/spark,sureshthalamati/spark,narahari92/spark,ericvandenbergfb/spark,someorz/spark,jlopezmalla/spark,ddna1021/spark,lxsmnv/spark,jkbradley/spark,jlopezmalla/spark,Aegeaner/spark,highfei2011/spark,big-pegasus/spark,brad-kaiser/spark,loneknightpy/spark,techaddict/spark,publicRoman/spark,ueshin/apache-spark,WeichenXu123/spark,WeichenXu123/spark,panfengfeng/spark,nlalevee/spark,hhbyyh/spark,gengliangwang/spark,poffuomo/spark,rikima/spark,gengliangwang/spark,ericvandenbergfb/spark,saturday-shi/spark,nchammas/spark,ajaysaini725/spark,SHASHANKB/spark,lvdongr/spark,rekhajoshm/spark,zero323/spark,yanboliang/spark,tengpeng/spark,rekhajoshm/spark,minixalpha/spark,highfei2011/spark,liyichao/spark,maropu/spark,bravo-zhang/spark,liutang123/spark,saturday-shi/spark,patrick-nicholson/spark,kiszk/spark,mzl9039/spark,WindCanDie/spark,ueshin/apache-spark,holdenk/spark,xuanyuanking/spark,aray/spark,BryanCutler/spark,metamx/spark,cin/spark,hvanhovell/spark,aosagie/spark,gengliangwang/spark,mzl9039/spark,alunarbeach/spark,loneknightpy/spark,markhamstra/spark,bdrillard/spark,nilsgrabbert/spark,HyukjinKwon/spark,brad-kaiser/spark,nilsgrabbert/spark,rezasafi/spark,zhouyejoe/spark,jlopezmalla/spark,tejasapatil/spark,tejasapatil/spark,srowen/spark,ericvandenbergfb/spark,gioenn/xSpark,zero323/spark,markhamstra/spark,rezasafi/spark,ahnqirage/spark,andrewor14/spark,debugger87/spark,ptkool/spark,milliman/spark,saturday-shi/spark,narahari92/spark,szhem/spark,aokolnychyi/spark,vinodkc/spark,xflin/spark,apache/spark,nchammas/spark,metamx/spark,big-pegasus/spark,1haodian/spark,vinodkc/spark,HyukjinKwon/spark,matthewfranglen/spark,ron8hu/spark,esi-mineset/spark,kiszk/spark,huang1900/spark,wangyum/spark,bdrillard/spark,setjet/spark,kissmetrics/spark,mahak/spark,JerryLead/spark,nilsgrabbert/spark,jkbradley/spark,big-pegasus/spark,nlalevee/spark,aokolnychyi/spark,publicRoman/spark,holdenk/spark,holdenk/spark,eyalfa/spark,ueshin/apache-spark,jiangxb1987/spark,nchammas/spark,someorz/spark,debugger87/spark,1haodian/spark,rezasafi/spark,Aegeaner/spark