How to deregister an invalid test?

Asked by Terry Guo

Hi there,

Recently I downloaded the lava-test-0.2.0-2011.08.tar.gz from launchpad and installed it by command "sudo ./setup.py install". And then I want to try the stream.json in directory example/stream.json, so I run this command to register this test "lava-test register-test ./example/stream.json".

After that I execute command "lava-test list-tests" and always got below error messages:

terguo01@ubuntu:~/lava-test-0.2.0-2011.08$ lava-test list-tests
Tests built directly into Abrek:
 - bootchart
 - firefox
 - glmemperf
 - gmpbench
 - gtkperf
 - ltp
 - peacekeeperposixtestsuite
 - pwrmgmt
 - pybench
 - smem
 - stream
 - tiobench
 - x11perf
 - xrestop
Tests provided by installed python packages:
Tests provided by Abrek registry:
Traceback (most recent call last):
  File "/usr/local/bin/lava-test", line 5, in <module>
    pkg_resources.run_script('lava-test==0.2.0', 'lava-test')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/EGG-INFO/scripts/lava-test", line 30, in <module>
    exit_code = abrek.main.main(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/main.py", line 28, in main
    return cmd_func.main(argv)
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/command.py", line 68, in main
    return self.run()
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/builtins.py", line 155, in run
    for test in provider:
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/providers.py", line 139, in __iter__
    self._fill_cache()
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/providers.py", line 133, in _fill_cache
    test = self._load_remote_test(test_url)
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/providers.py", line 122, 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 "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/cache.py", line 64, 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: ./example/stream.json
terguo01@ubuntu:~/lava-test-0.2.0-2011.08$

I realized that I used wrong way to register a test from .json file. So what's the correct way to do it and how to get rid of such error messages?

Question information

Language:
English Edit question
Status:
Solved
For:
Obsolete LAVA Test Edit question
Assignee:
No assignee Edit question
Solved by:
Zygmunt Krynicki
Solved:
Last query:
Last reply:
Revision history for this message
Best Zygmunt Krynicki (zyga) said :
#1

Currently there is no UI for that.

The only thing to do is to manually edit the test registry.
It is stored in ~/.config/abrek/registry.json.

The file is rather straightforward to read and edit. The only caveat is making sure it is valid JSON (trailing commas, quotes, etc.)

Revision history for this message
Terry Guo (terry.guo) said :
#2

Thanks Zygmunt Krynicki, that solved my question.