Skip to content

Commit 3d52765

Browse files
authored
Merge pull request #4305 from chu11/longtest_cleanup
teststuite: document and fixup LONGTEST tests
2 parents 9c041f2 + 7a44c18 commit 3d52765

File tree

10 files changed

+14
-34
lines changed

10 files changed

+14
-34
lines changed

t/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ All tests support a standard set of options:
100100
101101
```
102102

103+
Normally long running tests are not executed. The environment
104+
variable `TEST_LONG` may be set to have all long running tests run.
105+
103106
The environment variable `FLUX_TEST_INSTALLED_PATH` may also be set
104107
to the path to an *installed* version of the `flux(1)` command, for
105108
running the testsuite against an installed version of flux-core.

t/job-list/list-id.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
jobspec = job.JobspecV1.from_command(["sleep", "0"], num_tasks=1, cores_per_task=1)
2727

2828

29-
def list_cb(f, arg):
29+
def list_cb(f):
3030
print(f.get())
3131

3232

33-
def submit_cb(f, arg):
33+
def submit_cb(f):
3434
jobid = job.submit_get_id(f)
3535
h.rpc("job-list.list-id", dict(id=jobid, attrs=attrs)).then(list_cb)
3636

t/t0000-sharness.t

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,19 @@ test_expect_success COLOR,PERL_AND_TTY 'sub-sharness still has color' "
378378
EOF
379379
"
380380

381-
test_expect_success 'EXPENSIVE prereq not activated by default' "
381+
# Following test should only run by default when TEST_LONG isn't set
382+
if test -z "$TEST_LONG"; then
383+
test_set_prereq NO_TEST_LONG
384+
fi
385+
test_expect_success NO_TEST_LONG 'EXPENSIVE prereq not activated by default' "
382386
run_sub_test_lib_test no-long 'long test' <<-\\EOF &&
383387
test_expect_success 'passing test' 'true'
384-
test_expect_success EXPENSIVE 'passing suposedly long test' 'true'
388+
test_expect_success EXPENSIVE 'passing supposedly long test' 'true'
385389
test_done
386390
EOF
387391
check_sub_test_lib_test no-long <<-\\EOF
388392
> ok 1 - passing test
389-
> ok 2 # skip passing suposedly long test (missing EXPENSIVE)
393+
> ok 2 # skip passing supposedly long test (missing EXPENSIVE)
390394
> # passed all 2 test(s)
391395
> 1..2
392396
EOF
@@ -395,12 +399,12 @@ test_expect_success 'EXPENSIVE prereq not activated by default' "
395399
test_expect_success 'EXPENSIVE prereq is activated by --long' "
396400
run_sub_test_lib_test long 'long test' '' '--long' <<-\\EOF &&
397401
test_expect_success 'passing test' 'true'
398-
test_expect_success EXPENSIVE 'passing suposedly long test' 'true'
402+
test_expect_success EXPENSIVE 'passing supposedly long test' 'true'
399403
test_done
400404
EOF
401405
check_sub_test_lib_test long <<-\\EOF
402406
> ok 1 - passing test
403-
> ok 2 - passing suposedly long test
407+
> ok 2 - passing supposedly long test
404408
> # passed all 2 test(s)
405409
> 1..2
406410
EOF

t/t0018-content-files.t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ test_description='Test content-files backing store service'
44

55
. `dirname $0`/sharness.sh
66

7-
if test "$TEST_LONG" = "t"; then
8-
test_set_prereq LONGTEST
9-
fi
10-
117
test_under_flux 1 minimal -o,-Sstatedir=$(pwd)
128

139
BLOBREF=${FLUX_BUILD_DIR}/t/kvs/blobref

t/t0024-content-s3.t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ if test -z "$S3_HOSTNAME"; then
99
test_done
1010
fi
1111

12-
if test "$TEST_LONG" = "t"; then
13-
test_set_prereq LONGTEST
14-
fi
15-
1612
export FLUX_CONF_DIR=$(pwd)
1713

1814
test_under_flux 1 minimal

t/t1005-kvs-security.t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ These are tests for ensuring multiple namespaces work.
99

1010
. `dirname $0`/sharness.sh
1111

12-
if test "$TEST_LONG" = "t"; then
13-
test_set_prereq LONGTEST
14-
fi
15-
1612
# Size the session to one more than the number of cores, minimum of 4
1713
SIZE=$(test_size_large)
1814
test_under_flux ${SIZE} kvs

t/t1009-kvs-copy.t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ Test flux-kvs copy and flux-kvs move.
99

1010
. `dirname $0`/sharness.sh
1111

12-
if test "$TEST_LONG" = "t"; then
13-
test_set_prereq LONGTEST
14-
fi
15-
1612
SIZE=1
1713
test_under_flux ${SIZE} kvs
1814

t/t2100-job-ingest.t

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ test_description='Test flux job ingest service'
44

55
. $(dirname $0)/sharness.sh
66

7-
if test "$TEST_LONG" = "t"; then
8-
test_set_prereq LONGTEST
9-
fi
107
if ${FLUX_BUILD_DIR}/t/ingest/submitbench --help 2>&1 | grep -q sign-type; then
118
test_set_prereq HAVE_FLUX_SECURITY
129
SUBMITBENCH_OPT_R="--reuse-signature"

t/t2260-job-list.t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ listRPC="flux python ${SHARNESS_TEST_SRCDIR}/job-list/list-rpc.py"
1111
PERMISSIVE_SCHEMA=${FLUX_SOURCE_DIR}/t/job-list/jobspec-permissive.jsonschema
1212
JOB_CONV="flux python ${FLUX_SOURCE_DIR}/t/job-manager/job-conv.py"
1313

14-
if test "$TEST_LONG" = "t"; then
15-
test_set_prereq LONGTEST
16-
fi
17-
1814
fj_wait_event() {
1915
flux job wait-event --timeout=20 "$@"
2016
}

t/t2261-job-list-update.t

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ test_under_flux 4 job
88

99
RPC=${FLUX_BUILD_DIR}/t/request/rpc
1010

11-
if test "$TEST_LONG" = "t"; then
12-
test_set_prereq LONGTEST
13-
fi
14-
1511
fj_wait_event() {
1612
flux job wait-event --timeout=20 "$@"
1713
}

0 commit comments

Comments
 (0)