[chirp_devel] [PATCH] Fix minor bugs in run_tests (#2343, #2347)
Dan Smith
Sun Mar 15 12:43:52 PDT 2015
> -# change to the tests directory
> -scriptdir = os.path.dirname(sys.argv[0])
> -os.chdir(scriptdir)
> +if __name__ == "__main__":
> + # change to the tests directory
> + scriptdir = os.path.dirname(sys.argv[0])
> + if scriptdir:
> + os.chdir(scriptdir)
Why protect this with the __main__ check? This is never imported from
anywhere, so we're always in __main__ at this scope.
> -logger.handle_options(LoggerOpts())
> +if __name__ == "__main__":
> + if not os.path.exists("logs"):
> + os.mkdir("logs")
> + logger.handle_options(LoggerOpts())
Same.
That said, with that applied, I can run tests on windows properly.
--Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20150315/f01a9495/attachment-0001.bin
More information about the chirp_devel
mailing list