Changeset 27743


Ignore:
Timestamp:
05/11/23 21:26:36 (23 months ago)
Author:
jdquinn
Message:

BUG: Parsing tests under Python 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/runme.py

    r27610 r27743  
    99
    1010import numpy as np
     11
     12# Avoid the following error on Jenkins,
     13#
     14#   "Unable to init server: Could not connect: Connection refused
     15#
     16#   (runme.py:28445): Gdk-CRITICAL **: 02:23:15.525: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed"
     17#
     18import matplotlib
     19matplotlib.use('Agg')
    1120
    1221try:
     
    92101    # Get benchmark {{{
    93102    if benchmark not in ['all', 'nightly', 'validation', 'adolc', 'eismint', 'ismip', 'mesh', 'slc', 'thermal', 'tranforcing', 'qmu']:
    94         print(("runme warning: benchmark '{}' not supported, defaulting to test 'nightly'.".format(benchmark)))
     103        print(('runme warning: benchmark \'{}\' not supported, defaulting to test \'nightly\'.'.format(benchmark)))
    95104        benchmark = 'nightly'
    96105    # }}}
    97106    # Get procedure {{{
    98107    if procedure not in ['check', 'update', 'runFromNC']:
    99         print(("runme warning: procedure '{}' not supported, defaulting to test 'check'.".format(procedure)))
     108        print(('runme warning: procedure \'{}\' not supported, defaulting to test \'check\'.'.format(procedure)))
    100109        procedure = 'check'
    101110    # }}}
    102111    # Get output {{{
    103112    if output not in ['nightly', 'none']:
    104         print(("runme warning: output '{}' not supported, defaulting to test 'none'.".format(output)))
     113        print(('runme warning: output \'{}\' not supported, defaulting to test \'none\'.'.format(output)))
    105114        output = 'none'
    106115    # }}}
     
    114123    i1, i2 = parallelrange(rank, numprocs, len(list_ids))  # Get tests for this CPU only
    115124    list_ids = list_ids[i1:i2 + 1]
    116     if len(id) > 0 and id is not None:
     125    if len(id[0]) > 0 or len(id[1]) > 0:
    117126        test_ids = set(GetIds(id)).intersection(set(list_ids))
    118127        benchmark = None
Note: See TracChangeset for help on using the changeset viewer.