How to deregister an invalid test?

Asked by Terry Guo on 2011-09-05

Hi there,

Recently I downloaded the lava-test-0.2.0-2011.08.tar.gz from launchpad and installed it by command "sudo ./ 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/", line 467, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/", 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/", 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/", line 68, in main
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/", 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/", line 139, in __iter__
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/", 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/", line 122, in _load_remote_test
    with cache.open_cached_url(test_url) as stream:
  File "/usr/lib/python2.7/", line 17, in __enter__
  File "/usr/local/lib/python2.7/dist-packages/lava_test-0.2.0-py2.7.egg/abrek/", line 64, in open_cached_url
    stream = urllib2.urlopen(url)
  File "/usr/lib/python2.7/", line 126, in urlopen
    return, data, timeout)
  File "/usr/lib/python2.7/", line 383, in open
    protocol = req.get_type()
  File "/usr/lib/python2.7/", line 245, in get_type
    raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type: ./example/stream.json

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

English Edit question
Obsolete LAVA Test Edit question
No assignee Edit question
Solved by:
Zygmunt Krynicki
Last query:
Last reply:
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.)

Terry Guo (terry.guo) said : #2

Thanks Zygmunt Krynicki, that solved my question.