Skip to content

Commit 656a024

Browse files
committed
e2e 779, 787, 826: the status line names the package; a workspace document of one configuration names its sets without a prefix (SPEC-005 v1.6)
1 parent d280170 commit 656a024

3 files changed

Lines changed: 6 additions & 5 deletions

‎tests/e2e/779_a_build_program_declares_a_runtime_search_dir.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ grep -F -- "-Wl,-rpath,$RTDIR" "$G" >/dev/null \
119119
touch src/main.cpp # past the whole-project no-op fast path, without
120120
# touching build.mcpp itself
121121
"$MCPP" build > b2.log 2>&1 || fail "second build failed" b2.log
122-
grep -q "up to date (cached)" b2.log \
122+
grep -qE "up to date .*\(cached\)" b2.log \
123123
|| fail "the second build re-ran build.mcpp; the replay path was not exercised" b2.log
124124
G2=$(find_graph)
125125
[ -n "$G2" ] || fail "no build.ninja after the second build" b2.log

‎tests/e2e/787_emit_plans_every_member_on_its_own.sh‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
# narrower case (E3, #699 item 2 -- see e2e 789), where the member is still
1717
# described. Criteria:
1818
# A. `emit --workspace --format json` over `good` and `bad`: exit 1, `data`
19-
# present, its one set is `good/good`, `diagnostics` holds exactly one
19+
# present, its one set is `good` (one configuration: no prefix, SPEC-005
20+
# v1.6 R3.3), `diagnostics` holds exactly one
2021
# `error` with `path` "bad/mcpp.toml" and a message naming `bad`, and
2122
# `watch` lists `bad/mcpp.toml` alongside `good`'s own inputs.
2223
# B. Without `--format`, the same run prints the document (not empty) and
@@ -66,7 +67,7 @@ import json, sys
6667
e = json.load(open(sys.argv[1]))
6768
d = e["data"]
6869
sets = [s["name"] for s in d["database"]["sets"]]
69-
assert sets == ["good/good"], sets
70+
assert sets == ["good"], sets
7071
diags = e["diagnostics"]
7172
assert len(diags) == 1, diags
7273
diag = diags[0]
@@ -86,7 +87,7 @@ rc=$?
8687
set -e
8788
[ "$rc" = 1 ] || fail "B: bare invocation exit status $rc, expected 1" b.out b.err
8889
[ -s b.out ] || fail "B: the bare document is empty" b.err
89-
"$PY" -c 'import json,sys; d=json.load(open(sys.argv[1])); assert d["sets"][0]["name"]=="good/good", d["sets"]' b.out \
90+
"$PY" -c 'import json,sys; d=json.load(open(sys.argv[1])); assert d["sets"][0]["name"]=="good", d["sets"]' b.out \
9091
|| fail "B: the bare document's set" b.out
9192
grep -q "bad" b.err || fail "B: the failed member's reason is not on stderr" b.err
9293
echo "ok: B, the exit code is 1 without --format too, and the document still prints"

‎tests/e2e/826_plugin_diagnostics_features_and_names.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ grep -q "mcpp.acme.gen'.*mcpp\.\|claims an origin" d1.log && fail "R1: an own-na
7070
# fast path and reaches no build program, so it would measure neither path.
7171
touch src/main.cpp
7272
"$MCPP" build > d2.log 2>&1 || fail "D2: the second build failed" d2.log
73-
grep -q "up to date (cached)" d2.log || fail "D2: the second build ran the program; the replay is not measured" d2.log
73+
grep -qE "up to date .*\(cached\)" d2.log || fail "D2: the second build ran the program; the replay is not measured" d2.log
7474
grep -q "impact: no bindings are generated" d2.log || fail "D2: the cached run did not report the diagnostic" d2.log
7575

7676
# N1

0 commit comments

Comments
 (0)