Changes in / [1097bb7:eb60b04]
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Makefile.am
r1097bb7 reb60b04 22 22 23 23 AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread 24 AM_CFAFLAGS = -quiet -in-tree -nodebug 24 AM_CFAFLAGS = -quiet -in-tree -nodebug -std=c++14 25 25 AM_UPPFLAGS = -quiet -nodebug -multi 26 26 … … 139 139 $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000 $(srcdir)/fetch_add.c 140 140 141 tls-fetch_add$(EXEEXT): 142 $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000 $(srcdir)/tls-fetch_add.c 143 141 144 ## ========================================================================================================= 142 145 CTXSWITCH_DEPEND = \ … … 144 147 function.run \ 145 148 fetch_add.run \ 149 tls-fetch_add.run \ 146 150 ctxswitch-pthread.run \ 147 151 ctxswitch-cfa_coroutine.run \ -
benchmark/Makefile.in
r1097bb7 reb60b04 372 372 # applies to both programs 373 373 AM_CFLAGS = -O2 -Wall -I$(srcdir) -lrt -pthread 374 AM_CFAFLAGS = -quiet -in-tree -nodebug 374 AM_CFAFLAGS = -quiet -in-tree -nodebug -std=c++14 375 375 AM_UPPFLAGS = -quiet -nodebug -multi 376 376 BENCH_V_CC = $(__bench_v_CC_$(__quiet)) … … 402 402 dummy_SOURCES = dummyC.c dummyCXX.cpp 403 403 CTXSWITCH_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) 409 409 testdir = $(top_srcdir)/tests 410 410 all: all-am … … 799 799 $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000 $(srcdir)/fetch_add.c 800 800 801 tls-fetch_add$(EXEEXT): 802 $(BENCH_V_CC)$(COMPILE) -DBENCH_N=500000000 $(srcdir)/tls-fetch_add.c 803 801 804 @WITH_LIBFIBRE_TRUE@ctxswitch-kos_fibre$(EXEEXT): 802 805 @WITH_LIBFIBRE_TRUE@ $(BENCH_V_CXX)$(CXXCOMPILE) -DBENCH_N=50000000 $(srcdir)/ctxswitch/kos_fibre.cpp -I$(LIBFIBRE_DIR) -lfibre -
tests/Makefile.am
r1097bb7 reb60b04 28 28 timeouts= 29 29 30 TEST_PY = python ${builddir}/test.py30 TEST_PY = python3 ${builddir}/test.py 31 31 32 32 # applies to both programs -
tests/Makefile.in
r1097bb7 reb60b04 360 360 concurrent = 361 361 timeouts = 362 TEST_PY = python ${builddir}/test.py362 TEST_PY = python3 ${builddir}/test.py 363 363 364 364 # applies to both programs -
tests/config.py.in
r1097bb7 reb60b04 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # encoding: utf-8 3 3 """ -
tests/pybin/settings.py
r1097bb7 reb60b04 1 from __future__ import print_function2 3 1 import os 4 2 import sys 5 import tools3 from . import tools 6 4 7 5 try : … … 112 110 global install 113 111 global timeout 112 global width 114 113 115 114 dry_run = options.dry_run … … 120 119 arch = Architecture(options.arch) 121 120 timeout = Timeouts(options.timeout, options.global_timeout) 121 width = 24 122 122 123 123 … … 139 139 140 140 tools.rm(errf) 141 142 def 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_function2 3 1 import __main__ 4 2 import argparse … … 12 10 import sys 13 11 import time 12 import types 14 13 15 14 from pybin import settings … … 58 57 # Remove 1 or more files silently 59 58 def 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 ) 65 62 66 63 # Create 1 or more directory 67 64 def 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) ) 73 70 74 71 … … 200 197 # Start the walk 201 198 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 ) 203 203 204 204 ################################################################################ … … 268 268 cmd = "%s 2> /dev/null" % column 269 269 proc = Popen(cmd, stdin=PIPE, stderr=None, shell=True) 270 proc.communicate(input= text + "\n")270 proc.communicate(input=bytes(text + "\n", "UTF-8")) 271 271 else: 272 272 print(text) -
tests/test.py
r1097bb7 reb60b04 1 #!/usr/bin/python 2 from __future__ import print_function 1 #!/usr/bin/python3 3 2 4 3 from pybin.tools import * … … 102 101 print('ERROR: invalid arguments', file=sys.stderr) 103 102 parser.print_help(sys.stderr) 104 103 sys.exit(1) 105 104 106 105 # script must have at least some tests to run or be listing … … 112 111 # check that exactly one of the booleans is set to true 113 112 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) 115 114 parser.print_help() 116 115 sys.exit(1) … … 189 188 # run a single test and handle the errors, outputs, printing, exception handling, etc. 190 189 def run_test_worker(t) : 191 192 190 with SignalHandling(): 193 191 # print formated name 194 name_txt = "%24s " % t.name192 name_txt = '{0:{width}} '.format(t.target(), width=settings.width) 195 193 196 194 retcode, error, duration = run_single_test(t) … … 281 279 elif options.list : 282 280 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))) 284 282 285 283 else : 286 284 # check the build configuration works 285 settings.prep_output(tests) 287 286 settings.validate() 288 287
Note:
See TracChangeset
for help on using the changeset viewer.