Skip to content

Commit feb5743

Browse files
committed
e2e 821: the fast path is required on Linux only
The fast path serves only ELF products (#400). On macOS the second build planned again, as it must there, and still reported the edge's advice once; the test required the fast path on every unix-shell host. It now requires it on Linux and reads the full path elsewhere.
1 parent fd65327 commit feb5743

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

‎tests/e2e/821_an_edge_states_its_advice_on_both_paths.sh‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
# runs only for PE programs; the rule is the edge's, not the tool's.
1515
#
1616
# A1 the full path reports the advice once, without -v;
17-
# A2 after the action's input changes, the build takes the fast path, the
18-
# edge runs again, and the advice is reported once, with the new text;
17+
# A2 after the action's input changes, the build takes the fast path (on
18+
# Linux; it serves only ELF products, #400), the edge runs again, and
19+
# the advice is reported once, with the new text;
1920
# A3 a build in which the edge does not run reports nothing.
2021
set -e
2122

@@ -62,15 +63,21 @@ echo "ok: A1 the full path reports the advice once"
6263
sleep 1 # a coarse file system clock must see the input as newer
6364
printf 'second\n' > data/probe.in
6465
"$MCPP" build > b2.log 2>&1 || fail "the second build failed" b2.log
66+
# The fast path serves only ELF products (#400): on Linux the second build
67+
# must take it, or A2 tests nothing new; elsewhere it declines, and A2 reads
68+
# the full path again.
6569
if grep -q "Compiling" b2.log; then
66-
fail "A2: the second build planned again, so the fast path was not exercised" b2.log
70+
case "$(uname -s)" in
71+
Linux) fail "A2: the second build planned again, so the fast path was not exercised" b2.log ;;
72+
*) echo "READING 821: the fast path declines on $(uname -s) (#400); A2 reads the full path" ;;
73+
esac
6774
fi
6875
[[ "$(grep -c "probe input reads second" b2.log)" -eq 1 ]] \
69-
|| fail "A2: the fast path did not report the edge's advice exactly once" b2.log
76+
|| fail "A2: the second build did not report the edge's advice exactly once" b2.log
7077
if grep -q "probe input reads first" b2.log; then
71-
fail "A2: the fast path reported the previous run's advice" b2.log
78+
fail "A2: the second build reported the previous run's advice" b2.log
7279
fi
73-
echo "ok: A2 the fast path reports the advice of the edge that ran"
80+
echo "ok: A2 the second build reports the advice of the edge that ran"
7481

7582
"$MCPP" build > b3.log 2>&1 || fail "the third build failed" b3.log
7683
if grep -q "probe input reads" b3.log; then

0 commit comments

Comments
 (0)