B ÔÂ_Ïã@sTddlmZmZmZmZddlZddlZddlZ e j   dd¡d dd„ƒZ dd„Z dS) é)ÚdirnameÚabspathÚexistsÚjoinNz test.pyomozExecute Pyomo testscCs\|dkrtj}tttttƒƒƒƒ}dg}tt|ddƒƒrJ| t|ddƒ¡tj j   |||¡S)NÚpyomoz..zpyomo-model-libraries) ÚsysÚargvrrÚ__file__rrÚappendÚpyutilibÚdevÚruntestsÚrun)rÚbasedirÚtargets©rú)Úusagez-dz--dirÚstoreÚdirz7Top-level source directory where the tests are applied.)ÚactionÚdestÚdefaultÚhelpz-ez --excluder Úexcludez/Top-level source directories that are excluded.z--catz --categoryÚcatZsmokezSpecify test category.z--covz --coverageÚ store_trueÚcoverageFz/Indicate that coverage information is collectedz-vz --verboseÚverbosezVerbose outputz-oz--outputÚoutputzRedirect output to a filez--with-doctestÚdoctestsz*Run tests included in Sphinx documentationz --doc-dirÚdocdirz3Top-level source directory for Sphinx documentationz4Invalid documentation directory, path does not existrÚdocZ OnlineDocszRunning tests in directory %sZPYUTILIB_UNITTEST_CATEGORYÚallz ... for test category: %sézpyomo-model-librariesú-Ú.zpyomo.z __init__.pyÚtestTr z-p)&ÚoptparseÚ OptionParserÚ add_optionÚ parse_argsrrr ÚosÚpathrr"rÚ ValueErrorr!rrÚchdirrr ÚprintÚgetcwdÚenvironÚgetrrr rÚlenrÚ startswithÚsplitÚsetÚaddÚwalkr r r r)ÚparserÚ_optionsÚargsÚoutfiler"ÚoptionsZmydirsÚdirsrZ excludingÚeZtestdirsZtopdirÚrootÚsubdirsÚfilesÚfÚskiprrrÚOLD_runPyomoTests"sÞ   4                 "          rG)N)Úos.pathrrrrrZpyutilib.dev.runtestsr Z pyomo.commonrÚcommonZ pyomo_commandrrGrrrrÚs