suite.py 1.48 KB
Newer Older
1 2 3 4
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Pitivi video editor
# Copyright (c) 2014, Thibault Saunier <thibault.saunier@collabora.com>
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301, USA.
20
"""The Pitivi GstValidate testsuite."""
21 22 23
import os


24
# Instruct GstValidate to use the test manager with name == "pitivi".
25 26 27 28
TEST_MANAGER = "pitivi"


def setup_tests(test_manager, options):
29
    """Sets up the specified test manager."""
30 31 32 33 34
    path = os.path.abspath(os.path.dirname(__file__))
    print("Setting up Pitivi integration tests in %s" % path)
    options.pitivi_scenario_paths = [os.path.join(path, "scenarios")]
    options.add_paths(os.path.join(path, os.path.pardir, "samples"))
    options.pitivi_executable = os.path.join(path, "..", "..", "bin", "pitivi")
35
    test_manager.register_defaults()
36
    # Everything went fine.
37
    return True