tests: test_urls: Simplify adding in local tests

I'll use this to scoop up local ISOs for comprehensive testing
locally.
This commit is contained in:
Cole Robinson 2018-01-05 15:49:53 -05:00
parent c7ed34de63
commit c9ca8ab7ce
3 changed files with 11 additions and 2 deletions

2
.gitignore vendored
View File

@ -17,5 +17,7 @@ po/virt-manager.pot
/man/virt-convert.1
/man/virt-xml.1
/tests/test_urls_manual.ini
/virt-manager.spec
/virtcli/cli.cfg

View File

@ -8,6 +8,7 @@ exclude data/gschemas.compiled
recursive-include man *
recursive-include po *
recursive-include tests *
exclude tests/test_urls_manual.ini
recursive-include ui *
recursive-include virtManager *
recursive-include virtcli *

View File

@ -15,11 +15,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import unittest
import time
import logging
import os
import sys
import time
import traceback
import unittest
from tests import utils
@ -236,6 +237,11 @@ def _make_tests():
cfg = ConfigParser.ConfigParser()
cfg.read("tests/test_urls.ini")
manualpath = "tests/test_urls_manual.ini"
cfg.read(manualpath)
if not os.path.exists(manualpath):
print("NOTE: Pass in manual data with %s" % manualpath)
urls = {}
for name in cfg.sections():
vals = dict(cfg.items(name))