#!/usr/bin/env python # # This program is a bug registry to compare test results between different # runs of a test suite. It's prime purpose is to track known failures and # alarm if a test does not yield the result expected. # # Input files are either xml files created by this registry, or JUnit XML # files obtained from the test suite if --gtest_output="xml:filename.xml" is # set. # # Default input/output for registry files is stdin/stdout unless -f is # given. If -f is given, that file is both input and output file and is # modified in-place. # # Usage examples: # Create test registry from test results: # xit-bug-registry create some-results.xml > registry.xml # or # xit-bug-registry -f registry.xml create some-results.xml # # Verify test results against existing registry: # xit-bug-registry -f registry.xml verify some-results.xml # # Merge a new test registry into an existing one, adding new test # cases from second-registry but leaving the existing ones untouched: # xit-bug-registry -f registry.xml merge first-registry.xml second-registry.xml # # Print info about a test: # xit-bug-registry info MyTestSuite TestName < registry.xml # # Add information about a specific test case: # xit-bug-registry -f registry.xml edit MyTestSuite TestName add-bug http://bugs.freedesktop.org/1234556 # xit-bug-registry -f registry.xml edit MyTestSuite TestName rm-bug http://bugs.freedesktop.org/1234556 # xit-bug-registry -f registry.xml edit MyTestSuite TestName add-rpm xorg-x11-server-1.23-4.fc18.rpm # xit-bug-registry -f registry.xml edit MyTestSuite TestName rm-rpm xorg-x11-server-1.23-4.fc18.rpm # xit-bug-registry -f registry.xml edit MyTestSuite TestName add-commit 12354534deadbeef # xit-bug-registry -f registry.xml edit MyTestSuite TestName rm-commit 12354534deadbeef # import xit import logging logging.basicConfig(level=logging.DEBUG) cli = xit.XITTestRegistryCLI() cli.run()