Changes in / [1097bb7:eb60b04]


Ignore:
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • benchmark/Makefile.am

    r1097bb7 reb60b04  
    2222
    2323AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread
    24 AM_CFAFLAGS = -quiet -in-tree -nodebug
     24AM_CFAFLAGS = -quiet -in-tree -nodebug -std=c++14
    2525AM_UPPFLAGS = -quiet -nodebug -multi
    2626
     
    139139        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/fetch_add.c
    140140
     141tls-fetch_add$(EXEEXT):
     142        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/tls-fetch_add.c
     143
    141144## =========================================================================================================
    142145CTXSWITCH_DEPEND  =                 \
     
    144147        function.run                    \
    145148        fetch_add.run                   \
     149        tls-fetch_add.run                       \
    146150        ctxswitch-pthread.run           \
    147151        ctxswitch-cfa_coroutine.run     \
  • benchmark/Makefile.in

    r1097bb7 reb60b04  
    372372# applies to both programs
    373373AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread
    374 AM_CFAFLAGS = -quiet -in-tree -nodebug
     374AM_CFAFLAGS = -quiet -in-tree -nodebug -std=c++14
    375375AM_UPPFLAGS = -quiet -nodebug -multi
    376376BENCH_V_CC = $(__bench_v_CC_$(__quiet))
     
    402402dummy_SOURCES = dummyC.c dummyCXX.cpp
    403403CTXSWITCH_DEPEND = loop.run function.run fetch_add.run \
    404         ctxswitch-pthread.run ctxswitch-cfa_coroutine.run \
    405         ctxswitch-cfa_thread.run ctxswitch-cfa_thread2.run \
    406         ctxswitch-upp_coroutine.run ctxswitch-upp_thread.run \
    407         ctxswitch-goroutine.run ctxswitch-java_thread.run \
    408         $(am__append_1)
     404        tls-fetch_add.run ctxswitch-pthread.run \
     405        ctxswitch-cfa_coroutine.run ctxswitch-cfa_thread.run \
     406        ctxswitch-cfa_thread2.run ctxswitch-upp_coroutine.run \
     407        ctxswitch-upp_thread.run ctxswitch-goroutine.run \
     408        ctxswitch-java_thread.run $(am__append_1)
    409409testdir = $(top_srcdir)/tests
    410410all: all-am
     
    799799        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/fetch_add.c
    800800
     801tls-fetch_add$(EXEEXT):
     802        $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000  $(srcdir)/tls-fetch_add.c
     803
    801804@WITH_LIBFIBRE_TRUE@ctxswitch-kos_fibre$(EXEEXT):
    802805@WITH_LIBFIBRE_TRUE@    $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp  -I$(LIBFIBRE_DIR) -lfibre
  • tests/Makefile.am

    r1097bb7 reb60b04  
    2828timeouts=
    2929
    30 TEST_PY = python ${builddir}/test.py
     30TEST_PY = python3 ${builddir}/test.py
    3131
    3232# applies to both programs
  • tests/Makefile.in

    r1097bb7 reb60b04  
    360360concurrent =
    361361timeouts =
    362 TEST_PY = python ${builddir}/test.py
     362TEST_PY = python3 ${builddir}/test.py
    363363
    364364# applies to both programs
  • tests/config.py.in

    r1097bb7 reb60b04  
    1 #!/usr/bin/env python
     1#!/usr/bin/env python3
    22# encoding: utf-8
    33"""
  • tests/pybin/settings.py

    r1097bb7 reb60b04  
    1 from __future__ import print_function
    2 
    31import os
    42import sys
    5 import tools
     3from . import tools
    64
    75try :
     
    112110        global install
    113111        global timeout
     112        global width
    114113
    115114        dry_run    = options.dry_run
     
    120119        arch       = Architecture(options.arch)
    121120        timeout    = Timeouts(options.timeout, options.global_timeout)
     121        width      = 24
    122122
    123123
     
    139139
    140140        tools.rm(errf)
     141
     142def prep_output(tests):
     143        global width
     144        width = max(map(lambda t: len(t.target()), tests))
  • tests/pybin/tools.py

    r1097bb7 reb60b04  
    1 from __future__ import print_function
    2 
    31import __main__
    42import argparse
     
    1210import sys
    1311import time
     12import types
    1413
    1514from pybin import settings
     
    5857# Remove 1 or more files silently
    5958def rm( files ):
    60         if isinstance( files, basestring ):
    61                 sh("rm -f %s > /dev/null 2>&1" % files )
    62         else:
    63                 for file in files:
    64                         sh("rm -f %s > /dev/null 2>&1" % file )
     59        if isinstance(files, str ): files = [ files ]
     60        for file in files:
     61                sh("rm -f %s > /dev/null 2>&1" % file )
    6562
    6663# Create 1 or more directory
    6764def mkdir( files ):
    68         if isinstance( files, basestring ):
    69                 sh("mkdir -p %s" % os.path.dirname(files) )
    70         else:
    71                 for file in files:
    72                         sh("mkdir -p %s" % os.path.dirname(file) )
     65        if isinstance(files, str ): files = [ files ]
     66        for file in files:
     67                p = os.path.normpath( file )
     68                d = os.path.dirname ( p )
     69                sh( "mkdir -p {}".format(d) )
    7370
    7471
     
    200197        # Start the walk
    201198        dname = settings.SRCDIR
    202         os.path.walk(dname, step, '')
     199        for dirname, _, names in os.walk(dname):
     200                for name in names:
     201                        path = os.path.join(dirname, name)
     202                        op( path )
    203203
    204204################################################################################
     
    268268                cmd = "%s 2> /dev/null" % column
    269269                proc = Popen(cmd, stdin=PIPE, stderr=None, shell=True)
    270                 proc.communicate(input=text + "\n")
     270                proc.communicate(input=bytes(text + "\n", "UTF-8"))
    271271        else:
    272272                print(text)
  • tests/test.py

    r1097bb7 reb60b04  
    1 #!/usr/bin/python
    2 from __future__ import print_function
     1#!/usr/bin/python3
    32
    43from pybin.tools import *
     
    102101                print('ERROR: invalid arguments', file=sys.stderr)
    103102                parser.print_help(sys.stderr)
    104                 sys.exit(1)
     103                sys.exit(1)
    105104
    106105        # script must have at least some tests to run or be listing
     
    112111        # check that exactly one of the booleans is set to true
    113112        if not sum( (listing, all_tests, some_tests, some_dirs) ) > 0 :
    114                 print('ERROR: must have option \'--all\', \'--list\', \'--include\', \'-I\' or non-empty test list', file=sys.stderr)
     113                print('''ERROR: must have option '--all', '--list', '--include', '-I' or non-empty test list''', file=sys.stderr)
    115114                parser.print_help()
    116115                sys.exit(1)
     
    189188# run a single test and handle the errors, outputs, printing, exception handling, etc.
    190189def run_test_worker(t) :
    191 
    192190        with SignalHandling():
    193191                # print formated name
    194                 name_txt = "%24s  " % t.name
     192                name_txt = '{0:{width}}  '.format(t.target(), width=settings.width)
    195193
    196194                retcode, error, duration = run_single_test(t)
     
    281279        elif options.list :
    282280                print("Listing for %s:%s"% (settings.arch.string, settings.debug.string))
    283                 fancy_print("\n".join(map(lambda t: "%s" % (t.toString()), tests)))
     281                fancy_print("\n".join(map(lambda t: t.toString(), tests)))
    284282
    285283        else :
    286284                # check the build configuration works
     285                settings.prep_output(tests)
    287286                settings.validate()
    288287
Note: See TracChangeset for help on using the changeset viewer.