It works fine if you use a url (even file://) but if you register a test by giving it the path to a file it let's you do it, then fails badly when you try to list tests.
(s2)plars@plars-t500:/tmp/lava/lava-test$ lava-test register-test examples/stream.json
(s2)plars@plars-t500:/tmp/lava/lava-test$ lava-test list-tests
LAVA: Tests built directly into LAVA Test:
LAVA: - glmemperf
LAVA: - gmpbench
LAVA: - gtkperf
LAVA: - ltp
LAVA: - posixtestsuite
LAVA: - pwrmgmt
LAVA: - stream
LAVA: - tiobench
LAVA: - x11perf
Traceback (most recent call last):
File "/tmp/lava/s2/bin/lava-test", line 8, in <module>
load_entry_point('lava-test==0.2.dev', 'console_scripts', 'lava-test')()
File "/tmp/lava/lava-test/lava_test/main.py", line 43, in main
run_with_dispatcher_class(LAVATestDispatcher)
File "/usr/lib/pymodules/python2.7/lava_tool/dispatcher.py", line 81, in run_with_dispatcher_class
raise SystemExit(cls().dispatch())
File "/usr/lib/pymodules/python2.7/lava_tool/dispatcher.py", line 74, in dispatch
return command.invoke()
File "/tmp/lava/lava-test/lava_test/commands.py", line 103, in invoke
test_list = [provider[test_id] for test_id in provider]
File "/tmp/lava/lava-test/lava_test/core/providers.py", line 159, in __iter__
self._fill_cache()
File "/tmp/lava/lava-test/lava_test/core/providers.py", line 153, in _fill_cache
test = self._load_remote_test(test_url)
File "/tmp/lava/lava-test/lava_test/core/providers.py", line 142, in _load_remote_test
with cache.open_cached_url(test_url) as stream:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/tmp/lava/lava-test/lava_test/utils.py", line 219, in open_cached_url
stream = urllib2.urlopen(url)
File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 383, in open
protocol = req.get_type()
File "/usr/lib/python2.7/urllib2.py", line 245, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: examples/stream.json