File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,7 @@ TESTSCRIPTS = \
207207 t2616-job-shell-taskmap.t \
208208 t2617-job-shell-stage-in.t \
209209 t2618-job-shell-signal.t \
210+ t2619-job-shell-hwloc.t \
210211 t2710-python-cli-submit.t \
211212 t2711-python-cli-run.t \
212213 t2713-python-cli-bulksubmit.t \
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ #
3+ test_description=' Test flux-shell hwloc.xmlfile'
4+
5+ . ` dirname $0 ` /sharness.sh
6+
7+ test_under_flux 2 job
8+ unset HWLOC_XMLFILE
9+ unset FLUX_HWLOC_XMLFILE
10+
11+ test_expect_success ' shell: HWLOC_XMLFILE is not set for normal jobs' '
12+ test_must_fail flux run printenv HWLOC_XMLFILE
13+ '
14+ test_expect_success ' shell: -o hwloc.xmlfile sets HWLOC_XMLFILE' '
15+ flux run -o hwloc.xmlfile printenv HWLOC_XMLFILE
16+ '
17+ command -v hwloc-info > /dev/null && test_set_prereq HWLOC_INFO
18+ test_expect_success HWLOC_INFO ' shell: -o hwloc.xmlfile HWLOC_XMLFILE is valid' '
19+ flux run -o hwloc.xmlfile sh -c "hwloc-info --input \$HWLOC_XMLFILE"
20+ '
21+ test_expect_success ' shell: -o hwloc.xmlfile sets HWLOC_XMLFILE per node' '
22+ flux run -N2 --label-io -o hwloc.xmlfile printenv HWLOC_XMLFILE \
23+ > xmlfile.out &&
24+ test_debug "cat xmlfile.out" &&
25+ sed -n "s/^0://p" xmlfile.out >path.0 &&
26+ sed -n "s/^1://p" xmlfile.out >path.1 &&
27+ test_must_fail test_cmp path.0 path.1
28+ '
29+ test_expect_success ' shell: bad hwloc.xmlfile value is an error' '
30+ test_must_fail flux run -o hwloc.xmlfile=foo printenv HWLOC_XMLFILE
31+ '
32+ test_done
You can’t perform that action at this time.
0 commit comments