Changeset b24cbaf


Ignore:
Timestamp:
Sep 12, 2024, 4:14:29 PM (3 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
23fb819
Parents:
406c806
Message:

Reduce test suite's reliance on makefile.am EXTRA_DIST entries for including .in files in distribution (required for nightly build success).

Second attempt to fix Promote build by including recently added test data files.

Location:
tests
Files:
4 edited
3 moved

Legend:

Unmodified
Added
Removed
  • tests/Makefile.am

    r406c806 rb24cbaf  
    8181        avltree/avl-private.h \
    8282        avltree/avl.h \
    83         configs/.in/parseconfig-all.txt \
    84         configs/.in/parseconfig-errors.txt \
    85         configs/.in/parseconfig-missing.txt \
    8683        exceptions/except-io.hfa \
    8784        exceptions/with-threads.hfa \
    88         io/.in/io.data \
    89         io/.in/many_read.data \
    9085        meta/fork+exec.hfa \
    9186        concurrency/clib_tls.c \
     
    10095        echo "Gathering test files"
    10196        for file in `${TEST_PY} --list-dist`; do \
    102                 if test -f ${srcdir}/$${file}; then \
     97                if ls ${srcdir}/$${file} > /dev/null 2>&1; then \
    10398                        ${MKDIR_P} $$(dirname ${distdir}/$${file}); \
    104                         cp -df ${srcdir}/$${file} ${distdir}/$${file}; \
     99                        cp -df ${srcdir}/$${file} $$(dirname ${distdir}/$${file}); \
    105100                fi; \
    106101        done
  • tests/configs/parseconfig.cfa

    r406c806 rb24cbaf  
    5050        sout | "Different types of destination addresses";
    5151
    52         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
     52        parse_config( xstr(IN_DIR) "parseconfig.all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    5353
    5454    sout | "Stop cost: " | config_params.stop_cost;
     
    7777        sout | "Missing_Config_Entries thrown when config file is missing entries we want";
    7878        try {
    79                 parse_config( xstr(IN_DIR) "parseconfig-missing.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
     79                parse_config( xstr(IN_DIR) "parseconfig.missing.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    8080        } catch( Missing_Config_Entries * ex ) {
    8181                msg( ex );
     
    9292
    9393        try {
    94                 parse_config( xstr(IN_DIR) "parseconfig-errors.txt", entry, 1, parse_tabular_config_format );
     94                parse_config( xstr(IN_DIR) "parseconfig.errors.txt", entry, 1, parse_tabular_config_format );
    9595        } catch( Parse_Failure * ex ) {
    9696                msg( ex );
     
    106106
    107107        try {
    108                 parse_config( xstr(IN_DIR) "parseconfig-errors.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
     108                parse_config( xstr(IN_DIR) "parseconfig.errors.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    109109        } catch( Validation_Failure * ex ) {
    110110                msg( ex );
     
    115115        sout | "No error is thrown when validation succeeds";
    116116        config_params.stop_cost = -1; // Reset value
    117         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
     117        parse_config( xstr(IN_DIR) "parseconfig.all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    118118        sout | "Stop cost: " | config_params.stop_cost;
    119119        sout | nl;
     
    126126
    127127        config_params.stop_cost = -1; // Reset value
    128         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
     128        parse_config( xstr(IN_DIR) "parseconfig.all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    129129
    130130        sout | "Stop cost: " | config_params.stop_cost;
     
    139139
    140140        config_params.stop_cost = -1; // Reset value
    141         parse_config( xstr(IN_DIR) "parseconfig-all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
     141        parse_config( xstr(IN_DIR) "parseconfig.all.txt", entries, NUM_ENTRIES, parse_tabular_config_format );
    142142
    143143        sout | "Stop cost: " | config_params.stop_cost;
  • tests/pybin/test_run.py

    r406c806 rb24cbaf  
    2929                return os.path.normpath( os.path.join(settings.BUILDDIR, self.path, ".out"   , "%s.log" % self.name) )
    3030
     31        # one file that goes to the test's stdin
    3132        def input(self):
    3233                return os.path.normpath( os.path.join(settings.SRCDIR  , self.path, ".in"    , "%s.txt" % self.name) )
     34
     35        # several files available for this test to open
     36        def inputs_all(self):
     37                return os.path.normpath( os.path.join(settings.SRCDIR  , self.path, ".in"    , "%s.*" % self.name) )
    3338
    3439        def target_output(self):
  • tests/test.py

    r406c806 rb24cbaf  
    352352                for t in tests:
    353353                        print(os.path.relpath(t.expect(), settings.SRCDIR), end=' ')
    354                         print(os.path.relpath(t.input() , settings.SRCDIR), end=' ')
     354                        print(os.path.relpath(t.inputs_all() , settings.SRCDIR), end=' ')
    355355                        code, out, err = make_recon(t.target())
    356356
     
    360360
    361361                        print(' '.join(re.findall(r'([^\s]+\.cfa)', out)), end=' ')
    362 
    363                 print('')
    364362
    365363                # done
Note: See TracChangeset for help on using the changeset viewer.