Changeset a5121bf for tests


Ignore:
Timestamp:
Aug 7, 2018, 3:23:34 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
575a6e5
Parents:
524ed86
Message:

Tests can now be run from installed binaries or tree binaries

Location:
tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r524ed86 ra5121bf  
    3131        -Wno-unused-function \
    3232        -quiet @CFA_FLAGS@ \
    33         -DIN_DIR="${srcdir}/.in/" \
    34         @BUILD_IN_TREE_FLAGS@
     33        -DIN_DIR="${srcdir}/.in/"
    3534
    36 AM_CFLAGS += ${DEBUG_FLAGS}
     35AM_CFLAGS += ${DEBUG_FLAGS} ${INSTALL_FLAGS}
    3736
    3837CC = @CFACC@
     
    4847#----------------------------------------------------------------------------------------------------------------
    4948all-local :
    50         @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test}
     49        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${quick_test}
    5150
    5251all-tests :
    53         @+${TEST_PY} --all --debug=${debug} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     52        @+${TEST_PY} --all --debug=${debug}  --install=${installed} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    5453
    5554clean-local :
     
    6665
    6766concurrency :
    68         @+${TEST_PY} --debug=${debug} -Iconcurrent
     67        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
    6968
    7069#----------------------------------------------------------------------------------------------------------------
  • tests/Makefile.in

    r524ed86 ra5121bf  
    303303# applies to both programs
    304304AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \
    305         -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" \
    306         @BUILD_IN_TREE_FLAGS@ ${DEBUG_FLAGS}
     305        -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" ${DEBUG_FLAGS} \
     306        ${INSTALL_FLAGS}
    307307fstream_test_SOURCES = fstream_test.c
    308308avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c
     
    613613#----------------------------------------------------------------------------------------------------------------
    614614all-local :
    615         @+${TEST_PY} --debug=${debug} ${concurrent} ${quick_test}
     615        @+${TEST_PY} --debug=${debug}  --install=${installed} ${concurrent} ${quick_test}
    616616
    617617all-tests :
    618         @+${TEST_PY} --all --debug=${debug} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
     618        @+${TEST_PY} --all --debug=${debug}  --install=${installed} ${concurrent}               # '@' => do not echo command (SILENT), '+' => allows recursive make from within python program
    619619
    620620clean-local :
     
    631631
    632632concurrency :
    633         @+${TEST_PY} --debug=${debug} -Iconcurrent
     633        @+${TEST_PY} --debug=${debug}  --install=${installed} -Iconcurrent
    634634
    635635#----------------------------------------------------------------------------------------------------------------
  • tests/pybin/settings.py

    r524ed86 ra5121bf  
    6767                self.flags  = """DEBUG_FLAGS="%s" """ % ("-debug" if value else "-nodebug")
    6868
     69class Install:
     70        def __init__(self, value):
     71                self.string = "installed" if value else "in-tree"
     72                self.flags  = """INSTALL_FLAGS="%s" """ % ("" if value else "-in-tree")
     73
    6974def init( options ):
    7075        global arch
     
    7378        global make
    7479        global debug
    75         global debugFlag
     80        global install
    7681
    7782        dry_run    = options.dry_run
     
    7984        make       = 'make'
    8085        debug        = Debug(options.debug)
     86        install    = Install(options.install)
    8187        arch       = Architecture(options.arch)
    8288
  • tests/pybin/tools.py

    r524ed86 ra5121bf  
    102102                test_param,
    103103                settings.debug.flags,
     104                settings.install.flags,
    104105                flags,
    105106                target,
  • tests/test.py

    r524ed86 ra5121bf  
    8686        parser = argparse.ArgumentParser(description='Script which runs cforall tests')
    8787        parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='yes')
     88        parser.add_argument('--install', help='Run all tests based on installed binaries or tree binaries', type=yes_no, default='no')
    8889        parser.add_argument('--arch', help='Test for specific architecture', type=str, default='')
    8990        parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true')
Note: See TracChangeset for help on using the changeset viewer.