Esempio n. 1
0
def create_runtimes_and_results_file(testresults_dir, testsrcdir=None):
    """
    Write an empty runtimes file in the 'testsrcdir' (as a marker file to
    determine the testing root), then write a results file in the
    TESTING_DIRECTORY.
    """
    util.runcmd(vtu.resultspy + ' save', chdir=testsrcdir)

    vtu.runvvtest('-i --save-results', chdir=testresults_dir)

    resultsfname = get_latest_results_filename()

    return resultsfname
Esempio n. 2
0
    def run(self, **options):
        ""
        quiet          = options.get( 'quiet',          False )
        raise_on_error = options.get( 'raise_on_error', True )
        chdir          = options.get( 'chdir',          None )

        x,out = util.runcmd( self.cmd, chdir=chdir,
                             raise_on_error=False, print_output=False )

        if not quiet:
            print3( out )

        self.x = x
        self.out = out
        self.cntD = parse_vvtest_counts( out )
        self.testdates = None

        self.plat = get_platform_name( out )

        self.rdir = get_results_dir( out )
        if self.rdir:
            if not os.path.isabs( self.rdir ):
                if chdir:
                    self.rdir = abspath( pjoin( chdir, self.rdir ) )
                else:
                    self.rdir = abspath( self.rdir )
        elif chdir:
            self.rdir = abspath( chdir )
        else:
            self.rdir = os.getcwd()

        assert x == 0 or not raise_on_error, \
            'vvtest command returned nonzero exit status: '+str(x)
Esempio n. 3
0
def run_vvtest_with_hook( vvtest_args, envspec, batch=False ):
    ""
    cmd = vvtest_command_line( vvtest_args, batch=batch )

    os.environ['VVTEST_UNIT_TEST_SPEC'] = envspec
    try:
        x,out = util.runcmd( cmd, raise_on_error=False )
    finally:
        del os.environ['VVTEST_UNIT_TEST_SPEC']

    return x, out