File: test-mdanalysis

package info (click to toggle)
mdanalysis 2.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 116,696 kB
  • sloc: python: 92,135; ansic: 8,156; makefile: 215; sh: 138
file content (73 lines) | stat: -rw-r--r-- 2,880 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
set -efu

# mdanalysis tests are generally flakey, often timing out randomly
# see Bug#1108309 and https://github.com/MDAnalysis/mdanalysis/issues/5078
# so skip all tests for now
echo "mdanalysis tests are not stable, see Bug#1108309 and https://github.com/MDAnalysis/mdanalysis/issues/5078"
echo "hence skipping tests"
exit 2


arch=$(dpkg-architecture -qDEB_HOST_ARCH)

EXTRA_TEST_FLAGS=-v

# some tests are expected to fail
# so list tests to skip in array variable SKIP_TEST_LIST
declare -a SKIP_TEST_LIST

# mdanalysis tests are generally flakey, and fail often and randomly
# skip observed failures to reduce the failure cross-section
SKIP_TEST_LIST=("${SKIP_TEST_LIST[@]}" test_dihedral_attr_warning test_AnalysisFromFunction \
    test_villin_unfolded test_rmsd_frames test_file_guess_hydrogens test_gnm_run_step \
    test_all_backends_give_correct_results test_startframe test_hbond_analysis)

# parallel and openmp tests are unstable, often timing out
SKIP_TEST_LIST=("${SKIP_TEST_LIST[@]}" parallel multiprocess openmp)

# gsd tends to induce test time-outs, https://github.com/MDAnalysis/mdanalysis/issues/4209
SKIP_TEST_LIST=("${SKIP_TEST_LIST[@]}" gsd GSD)

# NSGrid is flaky and causes distance tests to often (randomly) fail
# https://github.com/MDAnalysis/mdanalysis/issues/4906
SKIP_TEST_LIST=("${SKIP_TEST_LIST[@]}" test_distances)

# mdahole2, pathsimanalysis are not yet packaged for debian
# (duecredit test journal.pcbi.1004568 accesses pathsimanalysis)
SKIP_TEST_LIST=("${SKIP_TEST_LIST[@]}" test_all_import[.analysis.hole2] journal.pcbi.1004568)

if [ "$arch" = "i386" ]; then
    SKIP_TEST_LIST=("${SKIP_TEST_LIST[@]}" test_multiprocess_COG[u4] test_ramachandran \
	test_clustering_three_ensembles_two_identical test_hbond_analysis)
fi

# many tests fail on big-endian systems
# see https://github.com/MDAnalysis/mdanalysis/issues/1829
if [ "$arch" = "s390x" ]; then
    SKIP_TEST_LIST=("${SKIP_TEST_LIST[@]}" test_start_stop_step test_count_by_time \
        test_rmsd test_mass_weighted test_custom_weighted test_ref_mobile_mass_mismapped \
	test_time test_dt test_total_time test_iter test_last_frame test_frame_jump \
	test_next_gives_second_frame test_set_time test_write_istart \
	test_write_trajectory_atomgroup test_write_trajectory_universe test_Timestep_time \
	test_rename_aux test_namdbin ref_reader25 ref_reader_extra_args25)
fi

SKIP_TESTS=""
list_initialised=0
for t in "${SKIP_TEST_LIST[@]}"; do
    if [ ${list_initialised} = 0 ]; then
        SKIP_TESTS=$t
        list_initialised=1
    else
        SKIP_TESTS="${SKIP_TESTS} or $t"
    fi
done
if [ "x${SKIP_TESTS}" != "x" ]; then
    SKIP_TESTS="not ( ${SKIP_TESTS} )"
fi
echo "skipping tests with SKIP_TEST_LIST=${SKIP_TEST_LIST[@]}"

for py in `py3versions -s`; do
    MPLBACKEND=agg $py -mpytest ${EXTRA_TEST_FLAGS} -k "${SKIP_TESTS}" --disable-pytest-warnings
done